Page 1 of 1

Making 32-bit Dos Os

Posted: Fri May 10, 2002 12:14 pm
by ASHLEY4
Can anybody tell me the best way to go about making a 32-bit dos clone.
What i mean by this is to run progs that now need DPMI
extenders.I have up to now been making a real mode dos clone and then adding a extender,but i am now thinking that this may not be the best way to do it.

This os does not have to run dos 16-bit progs,but has to run progs made with djgpp and free pascal etc for Dos.
And needs to be able to access ports and hardware etc.
It may not even be multitasking i do not know yet.
The main ? is how to do the equivalent of dos interrupts in PM ?????.
Thanks in advance.
\\\///
(@@)
ASHLEY4.

Re:Making 32-bit Dos Os

Posted: Sat May 11, 2002 6:57 am
by Pype.Clicker
Well, if you're on processors that support it (pentium and over), you can use the virtual interrupts facility (see chapter 15.3.3 of Intel System Programming manual : 'software interrupt handling in V86 mode') for delegating IRQs to Bios or realmode handlers.

For the I/O ports access, you can either run your user programs at DPL0 (i wouldn't do it, if i were you, but without multitasking, it can be done) or delegate access to some ports range by enabling them in the I/O permission bitmap of the table (see 6.2.1) and correctly setting the IOPL field of EFLAGS ...

System calls (i.e. INT21h or the like) can be done just as in real mode (for a user program point of view) once you set the IDT entry properly, but will probably be more complicated to "hook" than in legacy DOS environment

Re:Making 32-bit Dos Os

Posted: Sat May 11, 2002 11:32 am
by ASHLEY4
Thank's Pype.Clicker,that was a great help ;D

\\\///
(@@)
ASHLEY4.