Run 16-bit command line application on Windows 7 64-bit - windows

I have 16-bit command line tools that I want to run on Windows 7 x64
I don't want to use a Virtual Machine
Can the 16-bit tools be wrapped in some way?
Maybe a 16-bit CMD.exe emulator

http://takeda-toshiya.my.coocan.jp/msdos/
This may help you. (Japanese website)

Have you tried downloading XP Mode (http://www.microsoft.com/windows/virtual-pc/download.aspx) for Windows 7? I know it works for 16bit GUI applications, but I don't know about command line programs.
also, you might want to look at DosBox (http://www.dosbox.com). It runs old DOS games, i don't know how it interacts with Windows, however, so I don't know if you can access the file system, etc from DosBox.
good luck,
Mark

You must use some kind of a virtual machine. 16-bit is just not supported on Win64.

Try this if you are up to productivity apps. Its a variant of Dosbox
but built for old business apps
http://sourceforge.net/projects/vdos/

Related

How can I use DOS interrupts in 32-bit Windows assembly?

So I was writing assembly code in TASM. But now I want to migrate it to MASM and have it run on 32-bit Windows. Can I still keep the DOS interrupts or is there some other way to do it?
I want to ideally run this on Windows 10.
16 bit code from Windows 95 will still run on 32 bit windows at least until windows 7 (I don't have the software to try it on Windows 10).
However for 32 and 64 bit code, you have to start using the win32 api which use the less exciting "call" instruction instead of interrupts.
Simple answer: no, you can't. Under Win32/Win64, calling a DOS interrupt from a Windows program will crash your program with an "Invalid operation" message. Figure out what are you trying to do with DOS interrupts (console output? writing to files?), find corresponding Win32 API functions, and call them.
UPDATE: depends on what are you after. DOS interrupts are only available to DOS executables; Windows executables have to use Windows API. It's entirely possible to make Windows executables in assembly, MASM included, but you'd have to learn new techniques. Building DOS executables is supported in older versions of MASM, but that skillset is rather pointless in today's computing environment. For one thing, the DOS subsystem is slowly but surely going away from Windows - 64-bit versions of Windows don't have it anymore.

Is it possible to run an old MSDOS.EXE program on today's computers?

I have an old MSDOS program that I might want to run on a modern(er) machine.
Is it possible to install some MSDOS on these machines and run the .exe program?
A cmd window does not work on my machine now: it's 64 bit.
This is the case, for the interested:
I am building a Win10 program to do some tricky calculation. But it's not ready yet to use. My customer comes with a question that I maybe could answer with an old program I have, that ran in DOS, back in the 80's and 90's.
I would try using the compatibility mode windows 7 offers (unlikely that will work).
Your best bet is an emulator like DOSBox.
Any x64 based Windows will not allow you to run old 16 bit DOS code, it wouldn't be able to run 16 bit Windows code either.
I tried the same on my Windows 10 x64 only seconds ago and received this (German) denial message:
In my scenario the exe is even able to run in 386 mode with a dos extender but this does not help either because the base is 16 bit code.
You will need some kind of emulation or virtual machine. I gave DOSBOX 0.74 a quick try and it was able to run my old 16 bit DOS program which even makes use of an dos extender. There is no need to install dosbox, you can simply unpack the exe using 7-zip and provide it alongside your own program and use it as a launcher.
Just create a dosbox.conf file and put it in the same directory dosbox.exe is in. This content will automatically simulate a C-drive for DOS and launch your program as soon as you start dosbox.exe from Windows.
[autoexec]
mount C C:\yourprog.dir
C:
yourprog.exe
Just an addition to emulation/VM answers: for me, big part of DOS programs worked when booted in Windows XP x32 safe mode with console support (sic!). On Vista and higher I was not able to run any DOS executable. So mostly you'll need DOSBox-like program, but XP is still a good oportunity, though.

porting windows 7 drivers to winXP

Is it possible to manually edit the driver to make it function on windows XP?
I guess there are many differences, but it must be possible for simple drivers, kind of porting the locations / buses they use?
Do you mean without re-compilation? If so its not recommended.
If you are willing to compile then use appropriate WDK and select appropriate build environment and try to build. You may have to change the code depending upon any APIs changed/availability.
Also note that drivers are compiled per OS i.e. there are different build environments for WinXP, Windows 2003, Windows Vista, Windows 7 etc.

ShellexecuteEx fails with ERROR_NO_NET_OR_BAD_PATH

I'm developing a network redirector using RDBSS.
In our network redirector volume, a executable file which is packed from Inno Setup(Open source packer) can not be run.
When we do double-click the file in Windows Explorer, the Explorer shows this messagebox.
It works well on 32bit Windows. Only 64bit Windows is problem.
I guess it is related with npdll or MUP.
We have implemented npdll, and I thought it doesn't have any bug now. - Of course we also have npdll 64bit version.
Other executable files and any files work well for both 32 and 64OS.
If we run this file in 64bit Windows SMB volume, it runs fine.
So, I'm pretty sure some our codes have a bug.(npdll or redirector driver)
Could you guess anything about this?
P.S Is there a good document describing how MUP works? If you know, let me know please.
Thanks.
The other executables which work, are they 64-bit or 32-bit?
If only 32-bit processes (like InnoSetup) fail, could it be that you need to install both the 64- and 32-bit versions of your DLL on x64 systems? That's required for some DLL types (e.g. video codecs) if you want their functionality to be available to all programs, but I'm not familiar with RDBSS and thus don't know if it applies in this case.

assembly on windows 7

how can i make a device input and output control program on windows 7??
Previously there was an option called debug where we wrote our programs. but as far as i know this feature is no more in windows 7. how can i do assembly on windows7??
You can use an assembler such as NASM, YASM, etc., or MASM which is free with Visual Studio Express (for non-commercial use).
I was thinking of Grdb, but it is only available for 32-bit, as a debug alternative.
I'm not sure what you are asking for with your first question, so I cannot answer it. I hope the above answers your second question.
It sounds more like you want to write a device driver? If so, download the Windows Driver Kit from Microsoft.
You can use this to write your driver in assmbly code if you wish. Be aware that this is NOT a trivial task.
What may be a better idea for you is to either install the WinXP virtual machine feature that comes with Windows7, or install WinXP/98/95 on an old machine, and do your coding on that. Under those OSes the driver model was simpler, and you could easily access the interrupts directly and/or easily elevate yourself into Ring 0 if you needed to.
Debug is available on Windows 7 32 bit, but not 64 bit.

Resources