Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Dashboard
Posts: 6
Joined: 12. Oct 2017, 10:42

Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by Dashboard »

I am the author of an old graphics software, and every now and then I get a request saying "your dashboard software is 16-bit, my OS is 64-bit, what can I do?".

Of course, I run the software in my VirtualBox, successfully. It took me a while to set it up, and I don't remember all the steps - it was an awful lot of trial and error.

So I came here to check if there is a simple guide on "Running legacy 16-bit Windows applications on a Windows 32-bit XP guest".

I've passed the whole morning reading posts and threads, and am impressed by the wealth of information here. But I cannot find the simple guide, sorry. Maybe it exists, but neither me nor Google (site: ... virtualbox ... Windows XP) can find it.

What I really miss is a sticky post titled

"How to run 16-bit applications on Windows 10"

and listing the following steps:
- get a license for your guest (XP or Win7? who sells them? can it be done legally? is it really necessary?)
- download the latest Windows 10 version of VirtualBox from xx
- install and configure
- ....
- ....
- ....

Too complicated?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by mpack »

You are asking about a feature of XP (or of 32bit Windows in general), not a feature of VirtualBox. Would you ask HP or Dell the same question? Would you expect to find a page on the HP website, detailing how to run 16bit Win3 code on Win10?

Certainly these subjects are occasionally discussed here, but they are not a fit subject for VirtualBox tutorials.
Dashboard
Posts: 6
Joined: 12. Oct 2017, 10:42

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by Dashboard »

For many Windows users, there is only ONE reason to install VirtualBox: Their 16-bit applications don't work on a 64-bit OS. So NO, that is not a feature of XP, definitely not, it is a feature of VirtualBox that one can run a 32-bit version of XP.

Why am I wasting my time registering here and writing posts? 40 years of IT experience should have told me that nerds have only defensive answers to offer. Have a nice day, mpack.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by mpack »

You seem a little quick to resort to abuse. If it gets any worse then you'll be banned.

Running 16 bit apps would be a poor reason to choose VirtualBox IMHO.

And just to address your assumptions: my experience is probably longer and certainly deeper than yours. I wrote my first code in 1977 for a PDP11 and graduated just in time for the microcomputer revolution, so I've been doing that job ever since. That is a real 40 years of software development and support, not some vague "IT experience".

Bye.
Dashboard
Posts: 6
Joined: 12. Oct 2017, 10:42

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by Dashboard »

mpack wrote:Running 16 bit apps would be a poor reason to choose VirtualBox IMHO.
If you have a solution other than "port it to 32-bit Windows", I am very curious to see it. Re assumptions - apologies. Since I wrote my first FORTRAN IV program on a PDP-11 only in 1982, five years later than you, you definitely have more experience, congrats.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by socratis »

Dashboard wrote:So NO, that is not a feature of XP, definitely not, it is a feature of VirtualBox that one can run a 32-bit version of XP.
VirtualBox is a *hardware* emulator. It emulates a PC. What software you install on that PC and what features that software has, is not of particular interest to the hardware.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by mpack »

Dashboard wrote: If you have a solution other than "port it to 32-bit Windows", I am very curious to see it.
Well for a start you can host the original OS in VirtualBox. You don't need to install XP and then run a virtualizer within a virtualizer. Another option is something like DosBox, depending on the nature of the application. My own old DOS apps run fine in DosBox, I hear that Win3 apps run as well though I've not tried it.

XP is a supported guest, but supporting 16bit NTVDM inside of XP has never been a priority in VirtualBox. Things like networking and shared folders will not work so well.
 Edit:  Oh, and yes... if you are a developer with access to the source code then I assume that the best option would indeed be to port it to 32bits or 64bits. I don't know why you dismiss this option. Lots of code in my personal library was written in the 1980s and is still being used (albeit in maintained form) in my own Win64 apps running on Win10. 
Dashboard
Posts: 6
Joined: 12. Oct 2017, 10:42

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by Dashboard »

mpack wrote:Well for a start you can host the original OS in VirtualBox. You don't need to install XP and then run a virtualizer within a virtualizer. Another option is something like DosBox
The "original" OS is XP or Win7. The core of the application is 16-bit Windows (so DosBox won't work), but it uses many 32-bit DLLs. The user's PC is usually a recent 64-bit variant of Windows. As written above, I am not the user - my version works fine in VirtualBox. It is just that setting up VirtualBox and making XP or Win7 run on it is not that straightforward. My latest user sits in Brazil and has almost no IT experience...
the best option would indeed be to port it to 32bits or 64bits. I don't know why you dismiss this option.
About 1 MB of heavily complex code written partly in assembler, partly in a now defunct language (Gfa). I like challenges, but porting that stuff is simply impossible.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by mpack »

16bit code originally written for XP? I guess then that the IDE you used was already old at the time. I'm surprised you can call 32bit DLLs from 16bit code, I don't remember that thunking in that direction was possible... but then again I also don't remember ever trying it.
Dashboard wrote: About 1 MB of heavily complex code written partly in assembler, partly in a now defunct language (Gfa). I like challenges, but porting that stuff is simply impossible.
Ironically, the assembler stuff is probably the easiest to port. Maybe you just have to change a few directives, it rather depends on what dependencies it has.

I've never heard of GfA. A quick Google brings up GFA BASIC - is that what you refer to? If so then it looks like a typical structured BASIC, it should be relatively easy to port to other structured languages.

I earlier referred to code in my library "albeit in maintained form". That maintenance has sometimes included changing the language an app is written in, from UCSD Pascal to Turbo Pascal to Modula-2 to C, which is where I still am. On each occasion I had to write a little program to do the bulk of the translation work for me, then I just went through it a module at a time in my new IDE and got it to compile. It doesn't really take that long. Is that app of yours free or are you getting an income from it? If the latter then I'd have thought it was certainly worthwhile bringing the app into the current millenium, then milk it for a couple decades more!
Dashboard
Posts: 6
Joined: 12. Oct 2017, 10:42

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by Dashboard »

mpack wrote:16bit code originally written for XP?
Originally written for Win 3.1, then '98, XP, Win7.
Ironically, the assembler stuff is probably the easiest to port.
About 2,000 lines, but it's already 32-bit, no need to port it.
I've never heard of GfA. A quick Google brings up GFA BASIC - is that what you refer to? If so then it looks like a typical structured BASIC, it should be relatively easy to port to other structured languages.
Yes, it's GfaBasic. A great dialect when it came out but the author lost interest and forgot to port it to 32 bits.

Anyway, thanks for your optimism. I have ported quite a number of smaller applications from GfaBasic to MasmBasic, but this monster is just too complex. It is organically grown code, and almost every single proc had a fight with little Windows bugs. It cost me ten years of my life, and I won't go through it again. That's why VirtualBox is the solution. It's free, and in principle it is not difficult to install. My old software runs just fine with it, absolutely no problems. But you can't ask a Brazilian student "install XP on VirtualBox, then double-click on myprog.exe". This is why I asked for a step-by-step guide to install XP on VB.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by mpack »

Installing XP in a VirtualBox VM is no different from installing it on any other PC. There are things that can then be done to improve the experience, such as installing the GAs, but those instructions are in the user manual and are not unique to XP.
Dashboard
Posts: 6
Joined: 12. Oct 2017, 10:42

Re: Running legacy 16-bit Windows applications on a Windows 32-bit XP guest

Post by Dashboard »

OK, I will tell my Brazilian student to read the manual (for me, that was not sufficient, but I am probably too old and too dumb...).
Post Reply