[ros-general] DOS subsystem??
rob at koepferl.de
Fri Mar 5 00:18:19 CET 2004
1. You have to decide wether you want to use v86 mode or "real"
emulation. This is equal to have a dos emulation on just x86 machines.
For AMD64, I'm not sure wether v86-mode is supported in 64-p-mode.
For a decission pro emulation, go and download "dosbox" or help
improving it /customizing it for ROS' belongings.
2. Download sources of linux' dosemu .
Gather information about interrupts for several hardware.
(can be found in dosbox and dosemu). Find a customized (Free-)DOS-kernel
wich is prepared to to be used in v86-mode (there should be something
3. Read a book about The i386 Micoprocessor (or higher) (v86-mode)
4. Write the Virtual Machine Monitor. This is a (i.e.) win32 program
wich does some initialisation and special OS-calls to enable this
v86-mode. Since this program is registered as a MAchine Monitor it gets
a "message" from the Kernel if the Realmode program rose an exception by
executing a forbidden instruction.
This is just AFAIK. Correct me if I'm wrong
Andrew "Silver Blade" Greenwood schrieb:
> I did ask this on the ReactOS forum, but I thought I'd ask on the mailing
> list as well :)
> How would I go about implementing a DOS subsystem? I used to use DOS for all
> my programming, even when Windows 95 and 98 were around. I used to mess with
> software interrupts (had a copy of Ralf Brown's interrupt list) to do things
> like read raw data from floppy disks etc.
> I understand that Windows NT protects the hardware from direct access from
> non-kernel mode applications/drivers. How is this achieved? What prevents an
> application from simply executing an OUT or IN opcode? And what happens if
> an application attempts to?
> I assume x86 CPUs have some form of mode... Protected mode?... that allows
> this kind of protection.
> I also assume you can use normal DOS interrupts from a cmd.exe session in
> Windows. How does Windows use software interrupts? As when an IRQ is
> triggered, it causes the CPU to execute a software interrupt, what's there
> to stop usermode applications from stealing the system timer interrupt
> handler and thus break the kernel scheduling?
> But basically, what I'd like to know is where I'd start for creating a DOS
> subsystem? Where do I start?
> ros-general mailing list
> ros-general at reactos.com
More information about the ros-general