[fpc-pascal] Cooperative Mult Tasker under DOS with FP

Jérémie LEFRANCOIS j.lefrancois at altran-tech.net
Tue Jun 29 09:54:48 CEST 2004


What I mean by "weak hardware" is an imposed PC embeded with :
 - no mouse
 - DX 486 from 66Mhz to 133Mhz
 - 32 Mo RAM
 - 32 Mo HARD DISK (target configuration, development is 2Go)

The application is already written, with TP 5.5. Yet it becomes far too huge 
for DOS 640Ko, so there are overlays everywhere (it is terrible) and I intend 
to switch it to FreePascal (option -So of course) that I know will so easily 
solve all memory shortage problem (via GO32V2).
The applications uses a screen manager, a file manager and a cooperative 
multitasker (all three not mainttained anymore, with only TP 5.5 TPU 
available). *
Also lots of port access (RS232) but that will be coped with later.
I therefore have to port the three of these. I intend probably to quickly write 
the two first in C language (or adapt some ncurses or sqlite), yet the easiest 
way for me to cope with the cooperative multitasker would be a little Free 
Pascal program with a small part in assembler backuping and restoring context. 
Several of such units are available for TP, yet they - for what I understood - 
rely on TP mechanism and can not be adapted (for the assembler part) to 
FreePascal.

I know I could install the C compiler DJGPP, compile the FreeRTDOS C sources 
and invoke them from FreePascal, but I am quite convinced that will not work - 
unless someone says it has been done before. I will probaly give it a try, 
anyway.

There are 8 tasks, communicating with so called "buffers", some kind of message 
queue system provided by the curent multitasker (and also direct access to 
data, which is rather perillous, but that is another story). Mult tasking is 
cooperative with throughout use of a PAUSE instruction meaning "please anyone 
else go ahead to work".

Regards.

En réponse à Tomas Hajny <XHajT03 at mbox.vol.cz>:

> Lee, John said:
> > You may have looked at this already, but can't you run win 9x of
> some
> > sort eg 98. This can be quite cheap 10e or thereabouts...My guess is
> > this'll run on a 486/pentium with 1? G disk, 16? M memory -then use
> dos
> > (or even win32) fpc...
> 
> I'd add to this - what's your (the original poster) definition of
> “weak
> hardware”, and what is the program intended to do (at least roughly
> -
> what kind of tasks)? This might help to find the best alternative
> solution
> if necessary.
> 
> Regards
> 
> Tomas
> 
> 
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 



__________________
Jérémie Lefrançois
06 73 27 35 97 
Consultant 
Altran Technologies




More information about the fpc-pascal mailing list