CODE C/C++ TOOLCHAIN
==================

Install the DOS-hosted Open Watcom C/C++ tools from the official project:
https://openwatcom.org/download.php
https://github.com/open-watcom/open-watcom-v2/releases

Use an official complete DOS installation, including BINW, H, LIB286 and
EDDAT. Do not copy only WCL.EXE. Before starting CODE, configure:

  SET WATCOM=C:\WATCOM
  SET PATH=%WATCOM%\BINW;%PATH%
  SET INCLUDE=%WATCOM%\H
  SET EDPATH=%WATCOM%\EDDAT

Open CODE\HELLO.C with CODE. F4 saves and compiles the current C/C++ file:

  WCL -bt=dos -ml -0 -fe=filename.EXE filename.C

F5 saves, builds and runs after a successful compile. Compiler output and
program output remain on the DOS console until you press a key. Compiler
failures never launch an old executable. File slot text, cursor, selection,
clipboard and undo remain in memory while the child runs. Conventional
memory must be sufficient for both CODE and the child loader. Close unused
large file slots or build from DOS if the compiler cannot start.

This default produces 16-bit large-model, real-mode DOS applications with
8086 instructions. C++ is selected by the compiler from .CPP/.CXX/.CC.
Watcom provides conio.h. Try HELLO.C for text output, color and keyboard input.
Watcom's conio API is not identical to every Borland extension.

For several source files, create a .PRJ file and set Build to a DOS
command, such as WMAKE -f MAKEFILE. Open CODE\DEMO.PRJ from Project /
Open Project for a single-file example. Run / Compiler Output retains the
last capture; Enter follows recognized file and line references.

Rebuild COMMANDS/CODE itself from DOS with BUILD.BAT after closing CODE.
The built-in Watcom workflow refuses to write an output named CODE.EXE.

Open Watcom is a later open-source descendant of the commercial Watcom
compiler family used in the 1990s. It is not the original 1993 binary release.
The compiler is optional and distributed separately; CODE contains none of
Borland's proprietary compiler files. Open Watcom's license permits use and
redistribution subject to its conditions. If redistributing compiler files,
retain its notices/license and meet its source-availability requirements:
https://github.com/open-watcom/open-watcom-v2/blob/master/license.txt

DOOM-class graphics need more than conio.h: VGA framebuffer rendering,
input, sound and usually a 32-bit memory model/DOS extender. Open Watcom
also offers WCL386 for 32-bit DOS projects; set up the appropriate libraries,
linker and extender separately. CODE's F4/F5 default does not use an extender.
