Running DOS programs from XP Home

  • Thread starter Thread starter Mat
  • Start date Start date
If you think about it you realise that Dos programs do write to hardware. In fact it's the rare program that doesn't. All windows intercepted direct video writes, that's why graphics are so slow in a windowed screen. The point is if a dos program accesses the sort of hardware that dos programs usually did then that hardware is emulated. This bares no relationship to your hardware what the dos program thinks it's accessing.

So it's true and false that Dos programs that try to write to hardware won't run. If you have a custom built retail system I think you might be pushing it, but if a game writes to a CGA or VGA card then that appears in the dos window.

I'm running LHX Attack Chopper with the anti snow turned on. This required writing to a specific port on the CGA card.

There aren't many dos programs that don't work in the emulator. And those that don't seem to use particular versions of dos memory managers.


--
http://www.smh.com.au/news/opinion/webdiary/index.html
---------------------------------------------------------------
David Candy
http://www.mvps.org/serenitymacros
---------------------------------------------------------------
GSV Three Minds in a Can said:
from the said:
David Candy said:
Windows XP supports DIRECT HARDWARE ACCESS for Dos programs for well
known hardware devices. All windows emulated hardware to dos. As
direct hardware calls are generally easy to recognise (eg if one
writes to port 330 it's the MIDI port - and XP will recognise it as
such, and will send it through a VXD, to a driver, then to your sound
card [which may or may not be using port 330]). Hardware control is
the only way of controlling a sound card.

It doesn't support direct hardware access for devices that are not
well known.

That is the exact oppositte of my understanding.

NT based versions of Windows allow no direct access to the hardware by
application programs.

That is why DOS games that write directly to the video, DOS
communications programs that work directly with the serial port, and
specialty applications that work directly with a parallel port
authorisation plug (dongle) will not run.

That was my understanding too, based on comments received over the
years, and DOS programs that don't run under WinNT (vs those that do),
however I've never poked at the internals of the CMD DOS emulator, so
I'm prepared to believe either .. Sound certainly works (with 'legacy
sound support', and occasionally additional emulation software, loaded)
for some DOS games, and I do believe those were directly prodding the
sound card hardware.
 
You miss the point, that's real hardware.

No program, dos or windows accesses the hardware. At best they access a virtual device driver (that pretends the program has full control over it).

Now people keep saying "that dos programs that attempt to access hardware won't be allowed". This is not true. Common hardware is emulated. The program doesn't access the hardware direct but it think it is. Only well known hardware can be emulated of course. It is true to say that from the hardware's perspective though.

Also if someone want to write a dos program to directly access hardware on XP (which I don't think anyone would) it is possible. MS discusses it briefly in a article without saying exactly how. It involves writing a vxd (what I don't understand is how to use it).

--
http://www.smh.com.au/news/opinion/webdiary/index.html
---------------------------------------------------------------
David Candy
http://www.mvps.org/serenitymacros
---------------------------------------------------------------
That is the exact oppositte of my understanding.

NT based versions of Windows allow no direct access to the hardware by
application programs.

That is why DOS games that write directly to the video, DOS
communications programs that work directly with the serial port, and
specialty applications that work directly with a parallel port
authorisation plug (dongle) will not run.

My understanding is that you can access the hardware provided you do it
through the appropriate DOS or BIOS interrupt, when the call is actioned
by the emulator. But if you try to say write direct to a device's IO
area it will fail. As you find if you try say to run the Win98 FAT32EBD
program in a Command prompt, to generate a Win98 boot floppy. Or try to
run the old Norton DIsk Edit for DOS on a floppy.
 
David Candy said:
You miss the point, that's real hardware.

No program, dos or windows accesses the hardware. At best they access a virtual device driver (that pretends the program has full control over it).

Beg to differ, old chap. Check out the 'peek' and 'poke' commands in
good old gwbasic for just one example.


Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca

"The reason computer chips are so small is computers don't eat much."
 
Not really the dos program thinks it has control of the machine. Windows is running it in a sandbox and the processor in V86 mode.
 
Back
Top