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.
Making 32-bit Dos Os
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Making 32-bit Dos Os
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
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
Thank's Pype.Clicker,that was a great help ;D
\\\///
(@@)
ASHLEY4.
\\\///
(@@)
ASHLEY4.