Welcome to Antbook,
a PC-based development toolkit for programming
massively parallel computations
FREE SOTFWARE
version 1.0, July 1993
by R. Zuczek
——————————————————————
The toolkit consists of a small kernel (two pages of
source text), auxiliary functions (kernel extension),
programming tutorial, and stand-alone examples of programs.
You need MS-DOS and Borland Turbo-C Compiler v.2.0.
Other operating systems and C-compilers might be used
after appropriate modifications of the kernel.
The toolkit is good for experimenting with parallel
algorithms.
———————————————————–
The following options for Borland Turbo-C 2.0
is to be set:
model – tiny or small
usage of register variables – off
Copy kern.h and bope.h to the system include directory,
compile kern.c and bope.c
and add kern.obj and bope.obj to the system library:
tlib c:\tc\lib\cs -+kern -+bope
(the ’-’ sign is prepared for case of your own later modifications
of bope or kern). Compile your programs either in the integrated
environment (by means of tc, preferable), or using the command tcc:
tcc -mt -r- -Lc:\tc\lib -Ic:\tc\include
-e<main> <main> <subrout> <subrout> …
in case you have stand-alone subroutines.
——————————————————————
Comments to kern.c and bope.c
Three main functions are contained in kern.c: t(), tx() and o().
Each of the functions saves SP, BP, and stack (just 30 bytes,
you can change this size if you need) into ant structure (see macro SAVE).
Additionaly, in enqueue(), currentpoint is saved in ant.p.
The Borland compiler stores global data on _ScanTodVector+6.
enqueue() utilizes this information and allocates memory
to store global data of a program (20 bytes, if you want you can change it).
The pointer to the stored global data is stored in space[currentpoint].
The ant structure is enqueued into antqueue[] (one or two instances,
depending on whether t() or tx() is invoked). dequeue() and macro RESTORE
perform inverse operations.
If you have a compiler other than Borland’s 2.0 and want
to program ants with it, find out how it uses registers
and where it stores global data. Then, rewrite kern.c
accordingly.
bope() contains auxiliary functions to make programming movements
in space easier. You can add your own functions there.
Do not include application algorithms into bope.c.
———————————————————————-
I prepared a tutorial and accompanying programs
on the ocasion of ISIPCALA (International Summer Institute on
Parallel Computations, Algorithms and Languages) held in Prague
in 5 – 9 july, 1993, where I was a attendant (listener).
I made use of this event and announced this material among other
attendants and there was some interest. I have corrected
slightly the original text, modified some terms,
names of functions, and added more sample programs.
I had problems with drawing graphs in ASCII
so I have omitted the explanation of the algorithms
requiring complex graphics.
Ostrava, July 15, 1993
Presently I am with Soft-tronik
(for technical support in data communication),
Masarykovo nam. 5, 70100 Ostrava 1, Czechia
email: rzuc@soft-tronik.cs
rzuc@soft-tronik.cz