Microsoft has released GW-BASIC sources as free / open source software

GW-BASIC
Microsoft has announced the release of the sources of GW-BASIC, the programming language that was part of the MS-DOS operating system up to version 4. They were made available on the GitHub website under the free / open source MIT license. Microsoft will not accept requests for changes sent through the GitHub system, but anyone can freely not only go to read the assembly code but also experiment with it, probably using a virtual machine. The published sources date back to February 10, 1983, and, as for versions 1.25 and 2.0 of the MS-DOS operating system released in September 2018, this was done for historical and educational reasons.

Microsoft originally developed a version of the BASIC programming language called Microsoft BASIC, or simply MBASIC, for the CP/M operating system. The next step was BASICA, a new implementation that was included in the first version of MS-DOS and required the presence of an interpreter in a ROM. Subsequently, the development environment was enhanced and could run programs without the need for a ROM, and those new versions were called GW-BASIC. It was a crude programming language, and worked only through the interpreter, which means by launching the program within the programming environment, without the possibility of generating an executable program.

GW-BASIC was suitable for writing programs useful to MS-DOS users, but for more complex or even professional needs its limits came out quickly. It was easy to obtain what’s called “spaghetti code“, especially when it was necessary to use several GOTO turning them into a double-edged sword. The real programmer is not afraid of GOTO, but having several unconditional jumps from one point to another of a program hindered its readability, creating significant problems in case of further developments.

Microsoft developed a version of the BASIC programming language more suitable for writing complex and professional applications starting in 1985, QuickBASIC, which became the Microsoft BASIC Professional Development System (PDS) after a few years. In MS-DOS from version 5.0 QBasic was added, an interpreter of QuickBASIC with limits in some features that replaced GW-BASIC.

Evidently the nostalgia for the spaghetti code written in GW-BASIC was strong because Microsoft received a lot of requests to release the sources after the company released those of versions 1.25 and 2.0 of its MS-DOS operating system. GW-BASIC’s assembly sources are now available even though there’s no practical usefulness. Anyone wishing to experience the thrill of writing spaghetti code can look for BASICA/GW-BASIC emulators or compatible languages, the sources are useful for those who appreciate computer science archeology.

Leave a Reply

Your email address will not be published. Required fields are marked *