FOOL is a librairy coded with fasm for object oriented composition and programming.


------------------------------------------------------------------------------------------
the exemple file is ORG100h.ASM
it includes all that is needed for execution, simply compile and run.
------------------------------------------------------------------------------------------

an object (item) is composed of a set of pointers and values. exactlly like an api,
but it is based on index passing instead of stack passing.
item:
dd

to give execute an item, load its value in esi, and call the dword at [esi] for single stage.
and call the dword at [dword] from [esi] for two stage.

thread:
        mov esi,[itemtodisplay]
        mov eax,[esi]
        or eax,eax
        je @f
        call eax
@@:


the single stage is not good for multithreading. and the two stages is designed to execute
functions from a function list.

the function list is a table of dword pointers. each pointer point to a function.
then, to execute a function from an item in 2nd stage, load the item in esi,
load the first dword [esi] in eax, and load the dword [eax] in eax, then, call eax.

function_list:
f:
.null dd 0
.node dd node
.refresh dd refresh
.box dd box
.frame dd frame
.pong dd pong
...

the order of functions for multithreading need to be the same, to make it reliable
among the differents threads.

thread1:
        mov esi,[first]
        mov eax,[esi]
        or eax,eax
        je @f
        mov eax,[eax]
        or eax,eax
        je @f
        call eax
@@:

another way to manage the function list is to provide a set of equates.

then, set the call dword with corresponding equate.

f_equate:
fe:
.null = 0
.node = 1
.refresh = 2
.box = 3
.frame = 4
.pong = 5
...

then, to call the function, load the pointer, and convert it in offset for function_list,
then, load the effective pointer and call it.

thread2:
        mov esi,[first]
        mov eax,[esi]
        or eax,eax
        je @f
        mov eax,[eax*+f]
        or eax,eax
        je @f
        call eax
@@:

this lib is in development, then;
if you see a bug is really important, please, tell me, i'll focus on fixing.

list of bugs:
too lazy to sort them, then, i let you find by yourself... ;)


