HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
microsoft
GW-BASIC
C++2020–2025
microsoft / GW-BASIC · Archived

GW-BASIC

The original source code of Microsoft GW-BASIC from 1983

19Distinct people
21Mentions
1Explicit recommenders
3.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The original source code of Microsoft GW-BASIC from 1983

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

--------- ---- -- ---- ----- --- ---- ----- COPYRIGHT 1975 BY BILL GATES AND PAUL ALLEN --------- ---- -- ---- ----- --- ---- ----- ORIGINALLY WRITTEN ON THE PDP-10 FROM…

pan69 used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year21 dated mentions

Observed mentions: 2020-05-22 01:06:53 UTC to 2025-09-04 15:55:44 UTC.

02468102020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC909
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC615
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202

What Hacker News says

21 sources
The source code is such a fun read (for the comments). I found some source code for GW-BASIC, and here are two of my favorites: ;WE COULD NOT FIT THE NUMBER INTO THE BUFFER DESPITE OUR VALIENT ;EFFORTS WE MUST POP ALL THE CHARACTERS BACK OFF THE STACK AND ;POP OFF THE BEGINNING BUFFER PRINT LOCATION AND INPUT A "%" SIGN THERE ;CONSTANTS FOR THE RANDOM NUMBER GENERATOR FOLLOW ;DO NOT CHANGE THESE WITHOUT CONSULTING KNUTH VOL 2 ;CHAPTER 3 FIRST Edit: GW-BASIC, not QBASIC (https://github.com/microsoft/GW-BASIC)
In Microsoft’s original source code
I'm way ahead of you :) Unfortunately, rewriting it without reverse engineering makes it almost impossible to reach the same performance characteristics. These are essential to reproduce proper timing in several games. Also, it may not be much code, but the floating point operations are quite a piece of art. See the GW-BASIC source code, which is somewhat similar [1]. I also rewrote most of the BASIC interpreter directly in Kotlin, omitting assembly, but obviously that runs into the same compatibility issues. As far as I understand it, reverse engineering is not allowed without permission, although some people suggest that it is ok to get other software to run. Not sure whether that case would hold up for my entertainment value. [1] https://github.com/microsoft/GW-BASIC/blob/master/MATH2.ASM
In BASIC and the ROMs that changed the world (and then disappeared) (2022)
Hi! Massively predictable comment making noises about Symantec code-dumping QEMM, DESQview and DESQview/X :) Besides being a lot of fun to read, the latter (which incidentally got some attention on here just a month ago - https://news.ycombinator.com/item?id=29396561) is a whole DOS-native X server. IIUC only Netware's commissioned port of XFree86 comes close to that, but that runs on top of Netware's kernel infrastructure so doesn't really count. Naturally these sorts of situations sadly represent communicative chasms between geeks and management. Case studies in "it wasn't the end of the world" can perhaps be useful. My standard such example is the HP-20b and HP-30b calculators. On the surface they look just like other calculators HP made around the same time period (2008), but there happen to be a set of pins inside the battery compart
Read the rest
ment that allow reprogramming the non-bootloader-locked microcontroller inside. An SDK (https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv018.c...) (consisting mostly of a keypad test demo) filled in the remaining pieces (how the keyboard matrix worked, and how to get code running on the ARM CPU, basically), and the result was the WP-34S firmware that reimplemented calculator functionality completely from scratch (the code samples in the SDK provided zero such functionality). TL;DR, this kind of thing can definitely work and be constrained to a nice little obscure niche of very happy people with low/zero external side effects. In this case, I wouldn't even mind if the code was released under a similar license to what D used to use (https://archive.ph/20161022202138/https://github.com/dlang/d...) before Symantec relinquished control of the project (https://forum.dlang.org/thread/oc8acc$1ei9$1@digitalmars.com) and it was made fully open-source (https://news.ycombinator.com/item?id=14060846). Microsoft licensing GW-BASIC (https://github.com/microsoft/GW-BASIC) and early versions of MS-DOS (https://github.com/microsoft/MS-DOS) under MIT is... fascinating but understandable, yet entirely unnecessary. "View only with no repercussions but not open source" works for historical interest just fine too. What is a very good question is whether adequate precedent was set by relinquishing D that it would be tractably viable for say one or two individual campaigners to internally achieve something similar for arbitrary effectively-abandonware software that is only of historical interest. (If this turns out to not be possible because QEMM and/or DESQview are actively being supported in some way I think the whole retrocomputing scene would be very curious to hear about that through the grapevine!) Thanks for the interesting info about PC-DOS. That's very cool!
In Unidentified PC DOS 1.1 Boot Sector Junk Identified

Showing the 15 most recent of 21 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.