Mail Archives: djgpp/1996/11/05/19:43:39
stwand07 AT uctvms DOT uct DOT ac DOT za wrote:
>
> Hi all
>
> I have a friend who has developed a real-time, multiprocess, threaded,
> object-orientated, event-driven kernel. Currently it runs on the 8086
> processor, and consists of C++ with Assembly code for the "inner magic".
>
> He is interested in porting this to djgpp (protected mode 80386+). Of course,
> he will need to re-code the ASM code for GAS, but I am wondering if it is
> possible for him to implement his system on top of a DPMI host.
>
> As it is, his kernel handles all memory allocation, but uses DOS for I/O (using
> a semaphore I think, cause DOS isn't always re-entrant). Anyway, is it
> possible to install timer, keyboard, and user memory handlers on top of a DPMI
> host ? (The interrupt routines should be easy, right?) It'll be really cool
> if this system is ported to djgpp, so any feedback is appreciated.
>
> Adios
> Mark Wodrich.
>
> (Oh, the kernel is also distributed, ie. events and processes can be sent
> between machines on a network, but this is still in development).
This WOULD be really cool. I'm not too certain about the DPMI part, but
it should be
possible (although easier under dpmi 1.0 than 0.9).
Porting to djgpp should be relatively easy (however, gcc knows nothing
about far pointers
and interrupt routines, but djgpp's libc provides workarounds see the
faq (section 18))
Also, the assembly should not be too difficult as there is a nice
assembler available on
the net which is easier to use than gas
(ftp://sunsite.unc.edu/pub/Linux/Incoming/ look
for nas????.tar.gz), compiles out of the box for djgpp, and produces
djgpp compatable
coff files.
As an alternative to porting his kernal to dpmi, what about making it
the dpmi provider?
There are a few options for this: 1) port it to dpmi but use cwsdpr0 as
the provider and
put any required extensions into the kernel; 2) write a startup "stub"
which puts the cpu
into protected mode and allows dos to run in v86 mode (similar to what
emm386 does), I have
some code that does this, from Al Williams 'Dos 6 Developers Guild' (and
some old Dr Dobbs
Journal articals, basically the same code).
Bill
--
Leave others their otherness.
- Raw text -