Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • And all of it within ~4 Kbytes too!
  • And the PDF is about 100MB.
  • "FILE WILL BE DELETED AFTER PRINTING"

    hah I've never seen that before but reminds me to roguelike games.

    "permadeath coding" would be actually fun. IF compiler error THEN erase code repository or something like this

  • Or, just buy the source for a dollar and bury it:

    https://www.folklore.org/MacBasic.html

  • The source code (and original assets) to many video games from as late as the 90s has been lost. The publishing company often deleted it after the game shipped, thinking it just took up space. This is one reason why, for example, there hasn't been a substantive remaster of Final Fantasy VII.

    Also, it sounds like you described Vigil: https://github.com/munificent/vigil

  • Kent Beck called this “test && commit || revert” in 2018, and credits Oddmund Strømme for the idea: <https://medium.com/@kentbeck_7670/test-commit-revert-870bbd7...>
  • Gates would have had access to Dartmouth BASIC, which he likely referenced and possibly plagiarized while writing Altair BASIC. Back in that day, people shared software freely, so Gates took advantage.

    https://en.wikipedia.org/wiki/Dartmouth_BASIC

  • It's really neat that many of the comments in the 6502 version[0] match this 8080 version. I've only done a quick review but there's a lot of duplication. It's interesting to see how the 6502 version reflects its direct lineage from this version.

    The table of constants for the SIN function doesn't have the two bogus constants that make up the "WAIT 6502" easter egg[1]. Since WAIT wasn't in this version that easter egg couldn't exist anyway. That's not to say there isn't an easter egg of some kind in here, but it's not that one.

    (It's hard to believe it's been a year since the 6502 version was released. It seems like just a few days ago I was hunting around in the code for the easter egg...)

    [0] https://opensource.microsoft.com/blog/2025/09/03/microsoft-o...

    [1] https://www.pagetable.com/?p=43

  • These two guys* were crazy productive in the 2 months they worked. Just the level of commenting shows how much thought they were able to give it during that span.

    * plus the math package guy

  • Does the code work?

    I.e., has anyone OCR'd the listing and fed it into an emulator yet?

  • 2 months to write a working BASIC from scratch in the shared computer environment seems highly unlikely. I think more time would be required and having some source to inspire and guide the design would be a big advantage.
  • I checked the documentation and looks like even the 4K version supports single precision floating point numbers (32-bit). Not sure how they managed to do it in 8-bit machines but I guess they just had to use more registers/memory for each of them.
  • I always thought that the floating point routines were the big feature that made Microsoft BASIC a thing (compared with both Radio Shack and Apple integer BASIC). It's interesting reading about Monte Davidoff and also that Gates knew they needed a specialist for this.

    https://en.wikipedia.org/wiki/Monte_Davidoff

  • There's a good deep dive into the code here:

    https://www.maizure.org/projects/decoded-altair-basic/

  • One of the things I'm often curious about is how various BASIC interpreters organize memory for string storage. You'd think there's some way to reclaim memory after an expression involving intermediate strings is finished. But you don't see descriptions for how BASIC works in this regard.
  • Its talked about here: https://www.c64-wiki.com/wiki/Garbage_Collection

    The process they used was simple, but brutal.

  • Associated blog post from 2025:

    Celebrate 50 years of Microsoft with the company's original Source code

    https://www.gatesnotes.com/microsoft-original-source-code

    (Discussion: https://news.ycombinator.com/item?id=43575884)

  • Gates plays the long game. The man dodged multiple requests over decades to publish this og code that launched MS as a company (pretended he had misplaced the same or forgot to reply or something): only to perfectly time it for a jubilee release.
  • Here is the 6502 assembly source code for Microsoft Basic:

    https://github.com/microsoft/BASIC-M6502

  • Credit should be given to Digital Equipment Corporation. Back then software isn't what companies made money on, it is hardware. Source code wasn't guarded as a secret as it is today, and you could find print outs in the dumpster [1]. Bill Gates and Paul Allen found the source code of DEC Basic [2] and ported it. (Wikipedia says Microsoft Basic was "inspired by" DEC's PDP-10 BASIC-PLUS.)

    [1] https://www.businessinsider.com/10-things-you-didnt-know-abo...

    [2] https://www.theregister.com/software/2000/06/29/bill-gates-r...

  • This is the second time I've seen this weird false claim on Hacker News that MS BASIC is a port of DEC BASIC: https://news.ycombinator.com/item?id=43576119.

    From Paul Allen's site at https://paulallen.com/Futurist/Microsoft.aspx , it's said that the OS source code printouts is what they got out of the trash: "While his parents were concerned with his slipping grades, there was no slowing him down. He and Bill would go “dumpster diving” in C-Cubed’s garbage to find discarded printouts with source code for the machine’s operating system — an area Paul saw as the “Holy Grail” of software, which he knew he could use to unlock the machine’s potential. He was awestruck by the tightly written elegance on those printed pages."

  • From [2]:

    > Gates said: "I'd skip out on athletics and go down to this computer center. We were moving ahead very rapidly: Basic, FORTRAN, LISP, PDP-10 machine language, digging out the operating system listings from the trash and studying those."

    Is there more context clarifying this means they studied the source code of DEC Basic?

  • The Microsoft BASIC syntax is certainly inspired by DEC BASIC, but the actual implementation is completely different. DEC BASIC compiles the program source code into bytecode, while Microsoft BASIC tokenizes each line as it's entered and then interprets the tokens at runtime. You have to remember that minicomputers had vastly different capabilities from 8-bit microcomputers. Even if Gates did look at the code for DEC BASIC, there's not much there he could have used.