I have an old system which connects to my custom hardware that I will be delivering simple HTML out of.
If I wanted to waste electricity, I’d have two computers constantly running and then I can test my pages on the fly.
Instead, I want to do all my work on one computer my linux system.
Currently I can serve CGI pages through Apache in Linux and those are compiled C programs.
But because the target computer has Quick Basic and I compile EXE files through that language, I can do the same on my linux computer through DOSBOX.
The nice news is I can execute my Quick Basic program on a unix commandline via the linux WineConsole command and the output prints correctly despite the warning messages printed to stderr.
The sad news is I can’t find a way to load my EXE as if it was part of a URL in a browser and have the same contents shown in the browser itself as what I saw on the commandline.
My only guess is to find a specialized apache module that can allow me to associate extensions with programs but I don’t know of such a module.
Is there another way one can run an EXE file in linux apache and have the standard output contents dumped to the screen?
2
Answers
Have you tried using dosemu instead of dosbox?
If dosemu is able to output to stdout, you can wrap it inside a shell script that will be your CGI
If you aren’t using DOS specific routines in your basic code, you might be better of compiling it as a linux executable using a basic compiler for linux.
You might want to look into this. I know there is a compiler called FreeBasic which should be able to compile QuickBasic code to a linux executable.