top | item 39171964

(no title)

hervem | 2 years ago

Not even sure it is possible: Visual C++ for Win95 can't target Win3.1 (as I remember) meaning just building will be something.. Talking about CI/CD software working on this target kinda sum-up to 0.

I am already surprised that a company still support this target knowing that most dev tools for this platform are more found over enthusiast website rather than Microsoft itself. And having hardware for making these tools running too!

discuss

order

jasomill|2 years ago

The 16-bit Visual C++ 1.52c compiler (CL.EXE) and linker (LINK.EXE) are MS-DOS (DPMI[1], IIRC) executables, and should run under a variety of DOS emulators.

As an example, starting DOSBox-X with an empty scratch directory mounted as drive C, the Visual C++ 1.52c CD-ROM mounted as drive D, and no additional configuration,

  C:\>copy con hello.c
  #include <stdlib.h>
  
  void main(int argc, char **argv) {
      puts("Hello, MS-DOS.");
  }
  ^Z
    1 File(s) copied.
  
  C:\>set tmp=c:\
  C:\>set path=d:\msvc15\bin;%path%
  C:\>set include=d:\msvc15\include
  C:\>set lib=d:\msvc15\lib
  C:\>cl hello.c
  Microsoft (R) C/C++ Optimizing Compiler Version 8.00c
  Copyright (c) Microsoft Corp 1984-1993. All rights reserved.
  
  hello.c
  
  Microsoft (R) Segmented Executable Linker  Version 5.60.339 Dec  5 1994
  Copyright (C) Microsoft Corp 1984-1993.  All rights reserved.
  
  Object Modules [.obj]: hello.obj 
  Run File [hello.exe]: "hello.exe" /noi
  List File [nul.map]: NUL
  Libraries [.lib]: 
  Definitions File [nul.def]: ;
  
  C:\>hello
  Hello, MS-DOS.
  
  C:\>
Alternatively, the full Visual C++ 1.52c GUI environment should run on any 32-bit x86 version of Windows 10.

[1] https://en.wikipedia.org/wiki/DOS_Protected_Mode_Interface

dholm|2 years ago

I think OpenWatcom supports windows 3.x and it's quite a nice compiler if you are targeting older PC systems and don't require support for the latest versions of C or C++. You can easily use it to cross-compile from a modern OS and I used it a few years ago for a Hackathon where we implemented a simple demo that we built on Linux and ran in DOSBox with a CI-like pipeline (no Jenkins involved since it was just for fun).