BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News After MS-DOS, Microsoft Now Open Sources GW-Basic

After MS-DOS, Microsoft Now Open Sources GW-Basic

This item in japanese

Lire ce contenu en français

Microsoft released on GitHub the original 8088 assembly language sources for its interpreter for GW-BASIC 1.0, a dialect of the Beginner’s All-Purpose Symbolic Instruction Code (BASIC) programming language released in 1983 and bundled with MS-DOS operating systems on IBM PC compatibles. After re-open-sourcing MS-DOS, Microsoft proceeds with releasing GW-BASIC under an MIT license due to numerous requests.

Microsoft stated the motivations behind the new open-source release and the limitations it adheres to:

These sources, as clearly stated in the repo’s readme, are the 8088 assembly language sources from 10th Feb 1983, and are being open-sourced for historical reference and educational purposes. This means we will not be accepting PRs that modify the source in any way.


GW-BASIC is a BASIC interpreter inspired by Microsoft BASIC. Microsoft BASIC version 5 required a CP/M system with at least 28 KB of random access memory (RAM) and at least one diskette drive and offered very little in terms of interactions with external devices. There were for instance no functions addressing a large range of functionality available through output devices (like graphics, color, sound, or networking) or input devices (like joysticks or mice). Microsoft Basic was however seen (at the time) as a powerful implementation of BASIC.

GW-BASIC shipped as a fully self-contained executable and was bundled with MS-DOS operating systems on IBM PC, and represented an evolution in functionality vs. Microsoft Basic. GW-BASIC grew to include interfacing with joysticks, could communicate bi-directionally via COM serial ports, and play sounds. GW-BASIC however lacked a strong support for structured programming, as evidenced by the inclusion of the decried GOTO statement and the lack of local variables.

It was indeed not much more than a decade before that Edsger W. Dijkstra, A.M. Turing Award Laureate famously wrote his paper (A Case against the GO TO Statement) discussing the issues related to the GOTO statement. The essay is regarded as a major step towards the widespread deprecation of the GOTO statement and its effective replacement by structured control constructs, such as the while loop. Incidentally, Dijkstra’s Structured Programming book contributed enormously to the understanding of the design of programs and the use of structured programming.

GW-BASIC programs executed relatively slowly, in large part because it was an interpreted language. Microsoft made available the BASCOM BASIC compiler, to achieve improved speed. Altogether, GW-BASIC was able to run simple games and business programs. As it came bundled with MS-DOS, a whole generation of programmers was able to learn programming through BASIC.

GW-BASIC place was eventually superseded by QBasic, the interpreter part of the separately available QuickBASIC compiler.

Some developers have reacted with a fond nostalgia. Luis Alonso Ramos commented:

Awesome!! I remember using GW-BASIC when I was 9 or 10, learning programming in 1991-92.

10 PRINT “Hi!”
20 GOTO 100
100 END

The most impressive thing for me is the copyright notice in GWMAIN.ASM:

COPYRIGHT 1975 BY BILL GATES AND PAUL ALLEN

No Microsoft back then!

As a matter of fact, the following comments can be found in the source code:

BILL GATES WROTE A LOT OF STUFF.
PAUL ALLEN WROTE A LOT OF OTHER STUFF AND FAST CODE.
MONTE DAVIDOFF WROTE THE MATH PACKAGE (F4I.MAC).

Paul Pacheco exclaimed:

I learned to code 32 years ago in GW-BASIC . This certainly takes me back.

The released sources do not include build scripts, makefiles, or tools required to generate executable binaries, nor does it contain any pre-built binaries/executables.

There are now again growing calls (which originated in 2011 with the 20th anniversary of Visual Basic) for Microsoft to open source next VB-6 (Visual Basic).

Rate this Article

Adoption
Style

BT