mmxgn / doscode

Visual Studio Code dos programming with dosbox template

Repository from Github https://github.commmxgn/doscodeRepository from Github https://github.commmxgn/doscode

VSCode Project Template

This is a simple template for building dos programs with VSCode, Dosbox-X and Turbo C++.

How to use

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/.

Structure

  • .vscode/tasks.json - The commands for building and running main.c and main.exe. Change dosbox-x to dosbox here if you use dosbox instead of dosbox-x instead. I hope it's also obvious how you can change args 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. Builds src/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 - Runs build/MAIN.EXE and pauses the output.

Contacting me

Just leave an issue

About

Visual Studio Code dos programming with dosbox template

License:MIT License


Languages

Language:C 78.7%Language:Batchfile 21.3%