3 ms·
I could write simple code and compile it into an .exe, Any one care to explain how this was done?? I remember trolling BBS's as a youth attempting to learn ho
by cat199 9y ago
I could write simple code and compile it into an .exe,
Any one care to explain how this was done??
I remember trolling BBS's as a youth attempting to learn how to do the same thing, to no avail...
- zincwar 9y agoYou paid money for the commercial version of QuickBASIC and you clicked the compile button. The free version of QBASIC that comes with DOS didn't have a compiler.
- pidg 9y agoThere was a 'Compile' option in the File menu. You might be thinking of QBASIC (which came bundled with DOS), which wasn't the same as QuickBASIC (a commercial program). When a friend first gave me a floppy with QB45 on it and I discovered I could now compile my QBASIC programs it was indeed a magical day.
- evanpw 9y agoQBasic was the free version included with DOS and was only an interpreter. QuickBASIC was the full commercial version which included a compiler.
- psyc 9y agoI don’t remember the details, but QB was an IDE with compiler, like any IDE/compiler suite. Building an exe was a menu command, I think.
- blattimwind 9y agoYou could generate a stand-alone exe, which contained a copy of a VM, or an exe which required BRUN45.EXE to be present, which was the VM. The advantage of the latter option is that you save a lot of disk space (iirc like 40 kB) for multiple programs, since you only need to have a single copy of BRUN45.
- psyc 9y agoWow, I didn’t realize it was a bytecode+vm system until now. That explains why the “compiled” exes did not seem faster.
- tekstar 9y agoI remember doing it, because my "DOOM killer" took up too much lomem to run it and the QBASIC IDE at the same time. .. because my "DOOM killer" was a top-down shooter and I had defined the map as a 2 dimensional array of tile IDs :D I think this thread explains it, which is that QBASIC 4.5 could compile to EXE - http://qbasic.proboards.com/thread/466/bas-exe http://qbasic.proboards.com/thread/466/bas-exe
- meredydd 9y agoQuickBasic could do this (IIRC it generated an EXE that bundled a bytecode interpreter along with your code). The slightly later QBASIC, which was a cut-down version of QuickBasic distributed free with DOS, couldn't make an EXE. The best you could do was to make a .BAT file that invoked QBASIC with the right options. It's amazing, in retrospect, how important it felt to create a "real EXE". Nowadays, we write huge professional systems in scripting languages that need explicitly invoking with an interpreter - but back then, "grown up" programs were the ones that didn't need that.
- snuxoll 9y agoTo be fair, when you're on a UNIX-like system a program written in bash or a scripting language doesn't look any different from a compiled C binary from the endpoint of the user - shebang lines and the execute bit were a honking great idea. The whole issue with creating a "real EXE" was it was incredibly obvious when your program WASN'T an EXE on DOS and still to this day on Windows, to this day it still irks me when I download something and there's a .bat file to launch it - but I could care less if there's some wrapper shell script on Linux.
- dceddia 9y agoI remember this feeling too. It was one of the big motivations for me to learn C, back then: the ability to create a real .EXE that didn't need an interpreter. That, and the lightning-fast startup time of compiled programs. I remember simultaneously being excited about the fast startup time, and also feeling that my program didn't seem "real" if it finished its operations too quickly. Real programs took time to do things, and something about it felt fake when the program responded immediately.
- dwyerm 9y agoSure, but now you've got the problem I've been dealing with day-to-day: You need to launch your code using a specific version of the interpreter that has been pre-loaded with all the specific versions of the libraries that you need. This is why Go's ability to compile to a self-contained, QuickBasic-like, exe makes it attractive to me.
- deleted 9y ago[deleted]
- AnnoyingSwede 9y agoQB 4.5 introduced the compile option, the version shipped with DOS didn't have it.