Using OSLib
Installing
Download the latest release or the snapshot you prefer from the
download page. Then, decompress it in the
directory when you want to install OSLib:
tar -xvzf ll-yymmdd.tgz
if you downloaded the gziped tar file (Unix systems)
unzip -a ll-yymmdd.zip
if you downloaded the ZIP file (Unix and DOS systems).
The distribution file is expanded in the following directory tree:
oslib ------ll------i386
 
|
 
|
 
|--xlib
|--sys--ll
 
|
 
|--libc
 
|
 
|--libm
 
|
 
|--kl
 
|
 
|
 
|--examples
 
|
 
|--mk
 
|
 
|--lib
 
|
 
|--docs
The ll directory contains the OSLib include files, used to
compile the libraries and to interface programs with them.
The xlib directory contains the sources of the eXtender
library.
The libc and libm directories contain the
sources of the minimal C library and of the math library respectively.
The kl directory contains the sources of the Kernel Library.
The examples directory contains some sample programs using
OSLib. Each program acts ad a demo to show how to use a specifies
functionality, and as a test to check the correct behaviour of OSLib.
The mk directory contains the configuration files, to be used
for compiling OSLib on different architectures. Configuration files for
compiling OSLib in the Linux environments or on MSDOS (using DJGPP, either
V1 or V2) are provided.
The lib directory is the place where the libraries are put when
OSLib is compiled.
The docs directory contains the documentation in LaTeX format.
Compiling
Once you have unpacked OSLib, you have to configure it for the host
environment: in order to do this, you must create a config.mk
file in the root oslib directory.
As said above, the
mk directory contains some config files (for Linux/ELF and
MSDOS/DJGPP): in most case what you have to do is simply to copy the correct
file in config.mk .
For example, if your host system is a Linux box, you can configure OSLib
in the following way:
cd oslib
cp mk/linux.mk config.mk
Now, you can build the system:
make install
You will find the compiled demos (*.xtn ) in the
examples directory.
Using
Once you have compiled the libraries and the sample applications, you
may want to see something running :)
An OSLib application can be ran using a MultiBoot compliant boot loader
(read the bootloader documentation; for GRUB, look at
the boot page), or using our DOS eXtender,
X.
In order to run an OSLib program using x,
boot the target computer in DOS mode
copy x.exe and the executable file *.xtn
in a DOS directory
chdir to that directory
type x filename.xtn .
The program will run and (if everything goes well) return to DOS.
Now, you are ready to develop programs using OSLib.
|