Hacker News new | ask | show | jobs
by jasomill 870 days 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