This is a simple template for building dos programs with VSCode, Dosbox-X and Turbo C++.
Add a TURBO C++ installation to TC
under the root directory so that TCC.EXE
is under TC/BIN
. Then edit src/main.c
. Build it with CTRL+SHIFT+B
and run it with F9
. The resulting file will be under build/
.
.vscode/tasks.json
- The commands for building and runningmain.c
andmain.exe
. Changedosbox-x
todosbox
here if you use dosbox instead ofdosbox-x
instead. I hope it's also obvious how you can changeargs
in tasks to adapt it to your own building habits. A helpful document is VSCode's Variable Reference which tells you what you need to add to e.g. reference the file opened in the current editor.src/main.c
- The main file. I added some VGA commands if you want to start building from there. I am planning to follow 256 Color VGA Programming in C.BUILD.BAT
- The dos build batch file. Buildssrc/main.c
and pauses the output. Think of it as a watered down makefile. If you want to pass it arguments from.vscode/tasks.json
you can do so by referencing%1
for the first argument,%2
for the second, etc.RUN.BAT
- Runsbuild/MAIN.EXE
and pauses the output.
Just leave an issue