Code for the DOSBOX Retropie Controls menu for https://github.com/moonpi/dosbox-retropie-launch-control
I was able to compile control2.c into a MS DOS com file using bcc on a Raspberry Pi.
To install bcc on a Raspberry Pi or a Debian distribution of Linux:
sudo apt-get install bcc
To compile:
Go to the directory using the terminal:
bcc -Md -o controls.com controls2.c
You may be able to compile the other codes into MSDOS on DOS or Windows using anoher method. However, I have not tried that yet.