Running 16-bit software

Daniel Hart

Reputable
Mar 30, 2015
88
0
4,660
I have a customer who's looking to buy a new machine that will run 16-bit programs that he wrote in C over 10 years ago. My first advice was a virtual machine, but he has had numerous issues in the past with VM's and is saying he'd like to avoid them. Any advice? Will a 32 bit version of Win7 or 8 be okay for him?
 
Solution
I'd tend to try XP first. It won't have drifted as far away from the 16-bit roots. And always remember DOSBox. In fact, rather than a new machine...unless he needs one anyway...I'd say, give DOSBox a try. Good Old Games, AKA GOG, has used DOSBox to get a lot of old games running...as in, 20-25 years old. If it's C code, then *probably* it's DOS code, and DOSBox should work. And, if it is DOS code, I don't think XP will run it directly. You'd have to go ALL the way back to Win 3.1.

And Techy, that's not the problem. The instruction sets are significantly different. The OS calls are different. The 16 bit libraries have to be downloaded. Getting DOS code to run isn't nearly as hard as actually getting Win16 programs to run. I...

Daniel Hart

Reputable
Mar 30, 2015
88
0
4,660


:) I know right! He's an older man who used to be a programmer for IBM. Very interesting guy, just a little behind the times to say the least. Was thinking he might have to go XP for the most seamless transition. Thank you for the fast answer!
 

gangrel

Distinguished
Jun 4, 2012
553
0
19,060
I'd tend to try XP first. It won't have drifted as far away from the 16-bit roots. And always remember DOSBox. In fact, rather than a new machine...unless he needs one anyway...I'd say, give DOSBox a try. Good Old Games, AKA GOG, has used DOSBox to get a lot of old games running...as in, 20-25 years old. If it's C code, then *probably* it's DOS code, and DOSBox should work. And, if it is DOS code, I don't think XP will run it directly. You'd have to go ALL the way back to Win 3.1.

And Techy, that's not the problem. The instruction sets are significantly different. The OS calls are different. The 16 bit libraries have to be downloaded. Getting DOS code to run isn't nearly as hard as actually getting Win16 programs to run. I know I got Castle of the Winds to run...an old, REALLY simple dungeon crawl game. It's Win16. FreeGameEmpire has a Win16 emulation setup to help with that.

Oh...and I just tried setting it up again, on a Win 10 box running BitDefender. BitDefender blocked it...they claim the emulator is potentially dangerous. Yeah...well, unfortunately, that is true.

Honestly: there's no guarantee any of this will work. Try Wine; try DOSBox. DON'T try anything later than Win 7.
 
Solution

gangrel

Distinguished
Jun 4, 2012
553
0
19,060
The other half of the problem is, if this is Windows code, you need the 16 bit Windows libraries.

If he gets a new box...don't shoot for latest and greatest. Target Win 7...so, target stuff like 3rd gen Intel procs and chip sets.
 

Daniel Hart

Reputable
Mar 30, 2015
88
0
4,660


It is Dos code, that he said is primarily used for data collection. . Not sure exactly it does. Thank you for all the info, I'll research and have him try DOSBox before recommending anything about a new machine.
 

gangrel

Distinguished
Jun 4, 2012
553
0
19,060
He said he disliked VMs, but yes, that's another option. I'm using a VM right now for this; Win 10 box, using VMWare Player (which is free) to run XUbuntu. There are limitations that might be problematic for him...but also, might be because this is a Linux distro, and as such, works a bit differently.
 

Lee-m

Distinguished
Jan 27, 2009
866
0
19,210
It depends on the code really and what API it uses, and what it does.

You try getting a 16bit PC game working on windows 7 with no emulation its usually a no go. Windows compatibility with 16bit code pretty much went down with the switch to windows NT (windows 2000 and then XP).

really you want a 32 bit cpu and windows 98 machine, that would run 16bit code native. As already suggested above I would try DOSBox as a first port of call. As for a new machine ? I wouldnt bother unless the code really really needs to be run on the metal its self.

Maybe Linux will run that stuff under WINE.
 

gangrel

Distinguished
Jun 4, 2012
553
0
19,060
It's not game code, and it's not Windows code...OP said, it was data collection code tied to DOS. Which, as C code, makes perfect sense. This kind of stuff polls keyboard ports for input...it's THAT old. Mouse? What's that? API? What does that stand for? I barely remember doing a little bit of work on stuff like this in the mid to late 80s...never a whole lot, because at work we had totally different systems, and at home, I had massively cheaper systems...Apple or Commodore. And I did very, very little programming at home; software development was really painful back then.

But I do remember having to do some programming work...probably modifying a couple existing programs...in DOS. Keyboard handling...I remember tweaking around some of that.