syslib Introduction

  1. What is syslib
  2. Rationale
  3. This manual
  4. Installation

What is syslib ?

syslib is short for system libraries. It provides the base interface to the operating system. It is provided in the form of a Dynamic Link Library which includes all the routines which are described in this documentation, and also the c68 support routines which are necessary for running syslib programs.

Apart from the documentation about syslib and all the routines which are part of it, the detailt of the DLL system are also given here.

syslib not only contains a base level interface with the OS, but it also contains some utility code which should be generally useful for many applications.

As a library, syslib is designed to be as clean and consistent as we could make it. This is to a large extent achieved by using a consisten naming scheme and some general rules for the order in which parameters are passed, and also by only allowing access to the system via function calls, and explicitly not making it possible to fiddle around in system data structures.

Rationale

syslib is a set of low level library routines, mainly to provide an interface with the operating system (although some user code is included as well). The library is specifically written to be incompatible with the standard c library so that they can be mixed if necessary (although a lot of it is quite similar to what is already available).

The standard c library is specifically written for unix machines and presents a few problems when compared to syslib. In fact it is difficult to implement the standard libraries completely. This requires the support of signals, which is some kind of user interrupt of a program. However much more annoying is the limited error handling. Normally errors are reported by returning an out of the ordinary value to functions, and storing what the problem was is _errno, a global variable.

Unfortunately, global variables make programs modify their own code, in which case the code is not reentrant. As the standard libraries always use these variables, most c programs are not reentrant. However, if no global variables are used - then there are no problems. syslib specifically does not require the use of global variables. When library functions need to read or modify global variables, DLL linking also becomes difficult to provide.

Consistency is also a strong point of syslib. There is a consistent naming scheme, only one memory model, only one type of strings etc.

syslib is also intended to make programming safe. All unsafe constructs are not supported by syslib, or when possible, a safe way of doing things is provided. For example, many spects of the OS are only accessible because of direct access to the system data structures. This can however cause dangerous modifications and allows you to do some things which are not "clean". syslib specifically does not support such operations.

An example of an important part of the library is the support for external modules. This allows code to be written as a separate part of the program, which can be loaded on demand. This can be useful because it allows pieces of a program to be replaced by others, or extra pieces to be loaded, and less which has to be in the program always. This is for example very useful for printer drivers. Many drivers can be added when necessary (as indeed is the case in PROforma).

This manual

This manual is intended to explain in detail what syslib is about, and how it should be used. For some specific details like possible errors of the access routines, we would like to refer to the DATAdesign files for the specific libraries.

We (and everybody who uses these manuals) would like it very much if you could send us any comments about this manual, like

At the bottom of each page is mentioned when the HTML document was last modified. I will try to keep this date correct, however it is only meant to indicate changes in the information provided, I will not change that date when correcting spelling mistakes or HTML errors.

Installation

syslib is a resident extension which links itself in as a thing. Before syslib is loaded, you have to make sure that the DLL Manager is loaded.


PROGS, Professional & Graphical Software
last edited February 15, 1995