How to build the QD/CMD from QD/BAS using the Microsoft BASIC Compiler 1. Convert tokenized BASIC into flat ASCII. (The source code on the web site is flat ASCII, despite being named QD/BAS, so this step will not be necessary if you use that file.) (From TRSDOS 6/LS-DOS 6) BASIC load "qd/bas" save "qd/asc",A system 2. Compile flat ASCII source code, generating /REL file. (From TRSDOS 6/LS-DOS 6) BASCOM * qd/rel:=qd/asc:-E-O where is the drive number. The -O option causes L80 to generate a self-supporting executable instead of requiring external runtime libraries. 3. Link the executable. (From TRSDOS 6/LS-DOS 6) L80 * qd/cmd:-N,qd/rel:-E where is the drive number. BASCOM, L80 and associated executables were part of Model 4 BASIC Compiler, Radio Shack Catalog number 26-2218. Notice: For some unexplained reason, one of the modules that Microsoft compiler BASIC loads into the compiled program feels the need to reprogram the video controller when the compiled program starts. There is absolutely no need for this, and this bug was not noticed when Model 4 Compiler BASIC was accepted from Microsoft in the early 1980s. The problem is that the values that are programmed into the video controller are incorrect, slightly different than what TRSDOS 6 and LS-DOS 6 use and what is correct for the factory hardware adjustments of the Model 4, 4D and 4P systems. Why Microsoft felt the need to have BASIC take over this operating system activity will likely remain a mystery. Because of the bad values being loaded, it is possible that the video image may noticibly shift or become unstable (wavy or jittery) if you compile and then run your own version. The reprogramming occurs when the compiled program begins running. Because of this bug in the Microsoft libraries, the compiled version provided on the web site contains a BASIC runtime version that has been patched to cause BASIC to load correct values, although the loading is still not necessary. The screen may still blink for an instant, but should remain stable. Note also that if QD is compiled without the -O option (require the presence of BASRUN/CMD at runtime), the video reprogramming does not appear to occur. If you wish to patch your copy of the BASIC compiler, use FED. Locate the following bytes 62 50 55 08 19 64 18 18 00 09 00 00 and replace them with: 63 50 55 0a 19 04 18 18 00 09 65 09 This string appears in more than one of the files distributed with Compiler BASIC. This patch is provided without warranty and is meant only for the Model 4 version of BASCOM.