8 Libraries

There are some libraries implemented to make the live of the programmer a little bit easier. These libraries are not directly associated with system functionality like system calls, therefore they are listed in a seperate chapter.

The mentioned libraries handle

8.1 L3 Terminal Handling

The L3 terminal functionality is provided at a very low level. You can write a number of arbitrary characters to the screen and you can read a distinct number of characters from the keyboard. This is done by two functions,

These functions handle the protcol used to access the terminal. If you attach your task to the terminal, the terminal manager tries to communicate with your task to establish the terminal connection. Your task has to respond with a given sequence. If it doesn't do so, the terminal manager rejects the requested connection. Therefore you have to call TermRead or TermWrite before trying to attach your task to the terminal.

A simple Hello World program could look like follows.

#include <l3/l3term>

void main(void)
{
   TermPrint("Hello, World!\n");
}

8.2 Debug Output

There is a special task responsible for managing the debug terminal. The library function void HercPrint(char *text); provides access to this task. To use this function you have to do two things:

A simple Hello World program could look like follows.

#include <l3/herclog.h>

void main(void)
{
   HercInit();
   HercPrint("Hello, World!\n");
}

The log task doesn't understand a normal '\n' so you have to use ,,\n\r''.

8.3 Server Library

There is one library providing support for ,,server'' development, but it isn't restricted to this area. This library provides:

Normaly it is enough to call DefaultInit() to do all the necessary initialization. DefaultInit() does the following things:

If this doesn't meet your requirements, you have to do the initialization by yourself.


Marion Schalm, Jean Wolter, Michael Hohmuth
26.12.1995 (unfinished)