EvanAnderson a day ago

There's the "WAIT 6502,X" Easter egg[0]!

Lines 6530 - 6539 are the "MICROSOFT!" that gets printed.

Line 4914 is the code to check the address passed to WAIT and, if correct, print the "MICROSOFT!".

It really is inconspicuous. A source licensee definitely wouldn't find it by quickly perusing.

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

  • exitb a day ago

       "".join(map(lambda n: chr((n & 0o77) + 64), reversed([0o241, 0o124, 0o106, 0o217, 0o23, 0o217, 0o122, 0o103, 0o211, 0o315])))
    
    This python one-liner roughly recovers the hidden string out of defined bytes.
  • LocalH a day ago

    This is why I'm still skeptical about the claims that it's "impossible" for there to be a CP/M easter egg in CP/M, as Kildall claimed there was (although I think the likelihood of the same egg in MS-DOS is zero).

    • Joker_vD a day ago

      Then again, all we have is one person claiming that they witnessed it, and since Gary Kildall himself dropped the case against Microsoft and never bothered to push it, we probably will never know for certain.

  • chirsz a day ago

    It would be even better if this easter egg appeared on line 6502!

pico303 a day ago

I love how the initial commit is "48 years ago."

  • JdeBP a day ago

    If you enjoyed the datestamps on that repository, you will definitely enjoy the datestamps on this one:

    * https://github.com/dspinellis/unix-history-repo

    You'll also enjoy the contributors list.

    • user3939382 a day ago

      I recently diffed Unix 10 and NetBSD to see if or how many common actual byte-for-byte original code I could find. I found some.

      • xeviousrr a day ago

        Of course, because if you have two similar applications, some of the code will likely be the same if the codebase is large enough.

        • user3939382 a day ago

          Yes it’s due to architecture. Apparently because of the 4.4BSD-Lite lineage it wouldn’t possess the original source with those exceptions.

    • bee_rider a day ago

      Man, imagine a 2.5k line kernel. You could probably fully understand how part of the computer works.

      • cout a day ago

        How do you write half a line of code?

        • mmmlinux a day ago

          Do you know about half button presses?

          • pxx 14 hours ago

            An A press is an A press. You can't say it's only a half

            • bee_rider 10 hours ago

              I can’t remember which generation of console it was, but IIRC some video game controllers made a big deal of their special buttons that could tell the difference between partial and full presses.

              This lead to the phrase “pressure sensitive buttons” being bandied about, which is kind of funny (what is a pressure insensitive button? An immobile lump I guess).

        • bee_rider a day ago

          Odd, I guess my autocorrect got rid of the k. Thanks! Luckily the edit window was still open.

      • jmbwell a day ago

        Used to be, with a scope, you could watch it working

    • dramm a day ago

      Aw darn :-(

      Contributors: There was an error generating this graph

  • msgilligan a day ago

    Although that date should really only apply to the `m6502.asm` file. I think for a historical archive accuracy should be important. For example when was it licensed under the MIT license, I assume fairly recently. The file date should reflect that.

  • antod an hour ago

    At this rate, we could get AmigaBASIC released in about 8yrs.

  • ezoe a day ago

    I wish they set the author to the appropriate person. I assume Bill Gates.

    • canucker2016 11 hours ago

      Bill Gates wrote the initial BASIC interpreter using Paul Allen's PDP-10 assembler macros so they could run the generated interpreter on a PDP-10, while also extracting a native binary for the targeted CPU/OEM hardware.

      from Paul Allen's Idea Man biography:

        ... It gathered steam with the release of the 6502 chip from MOS Technology at an unheard-of $25. For each new microprocessor, I created a new set of development tools on the PDP-10, while Ric [Weiland, 2nd new-hire, 4th employee] helped with the BASIC interpreter rewrites. 
      
      Bill Gates was involved with the business-side of the company at this point, trying to sign new clients for the BASIC interpreter.

      So Ric Weiland would have done much of the 6502 BASIC interpreter.

      • leecoursey 11 hours ago

        Lines 6913-6918:

           AUTTXT: ACRLF
           12 ; ANOTHER LINE FEED.
           DT"WRITTEN "
           DT"BY WEILAND & GATES"
           ACRLF
           0>
        • canucker2016 2 hours ago

          for thoroughness, from https://www.pagetable.com/?p=43#comment-1033 (comment supposedly by Bill Gates)

            Rick Weiland and I (Bill Gates) wrote the 6502 BASIC.
          
            I put the WAIT command in.
          
            Mark Chamberlin and I wrote the 6800 BASIC.
          
          
          Earlier in that blog post:

            Now who wrote the 6502 version? The KIM-1 BASIC manual credits Gates, Allen and Davidoff, the original authors of the 8080 version, but it might only be left over from the manual for the 8080 version. Davidoff, who worked for Microsoft in the summers of 1975 and 1977, had not been there when BASIC 6502 was written in the summer of 1976, but he probably changed the 6 digit floating point code into the 9 digit version that is first found in BASIC 6502 1.1 (KIM-1, 1977).
          
            The ROM of the 1977/1978 Ohio Superboard II Model 500/600 (6 digit BASIC 1.0) credits RICHARD W. WEILAND, and the 1977 9 digit KIM-1 BASIC 1.1 as well as the 1981 Atari Microsoft BASIC 2.7 credit “WEILAND & GATES”. Ric Weiland was the second Microsoft employee. These credits, again, were easter eggs: While they were clearly visible when looking at the ROM dump, they were only printed when the user entered “A” when BASIC asked for the memory size.
          
            According to apple2history.org, Marc McDonald (employee number 1) wrote the 6502 version, but it is more likely that McDonald wrote the 6800 simulator and Weiland ported 8080 BASIC to the 6800 and then McDonald adapted the 6800 simulator to the 6502 and Weiland wrote the 6502 BASIC.
          
            This and the hidden credits in version 1.0 of 6502 BASIC suggest that Weiland was the main author of 6502 BASIC. Gates is added to the hidden credits in the 1.1 version, so Gates probably contributed to the 1.1 update..
  • achrono a day ago

    I love even more how it's a .md file from well before Markdown even existed.

    • perching_aix a day ago

      I bet it being a Git repo must straight up feel otherwordly then.

      It's just a nice touch.

      • prerok a day ago

        No, skynet went to the past and gave git and md to microsoft, which then proceeded to create the doc format from the md as a starting point :P

    • nodesocket a day ago

      Way before git was even released in 2005.

  • xattt a day ago

    Are GitHub commit timestamps stored as Unix epoch time? If so, could we get similar timestamp accuracy when working with historical source code from systems like UNIVAC?

    • prerok a day ago

      Yes, somebody could doctor those commits with the right timestamp so that we would get a clear historical progression.

      It's doable, but would have to doctored, there was no git then, obviously.

    • badc0ffee a day ago

      Even if it was a 32-bit timestamp, you could still express dates back to December 13, 1901.

      • dgl a day ago

        It's not; the git format defines it as a positive integer, see git help commit:

            DATE FORMATS
               The GIT_AUTHOR_DATE and GIT_COMMITTER_DATE environment variables support the following date formats:
        
               Git internal format
                   It is <unix-timestamp> <time-zone-offset>, where <unix-timestamp> is the number of seconds since the UNIX epoch.
        
        Changing a commit's timestamp is as simple as:

            $ git commit --amend --date='1970-01-01T00:00:00' --reset-author
            [main 6e1d001] test
             Date: Thu Jan 1 00:00:00 1970 +0000
             1 file changed, 1 insertion(+)
        
        But dates before 1970 really don't work (in some cases it gives "fatal: invalid date format"):

            TZ=UTC git commit --amend --date='1969-12-31T23:59:59Z' --reset-author
            [main 47e54f0] test
             Date: Mon Dec 31 23:59:59 2012 +0000
             1 file changed, 1 insertion(+)
  • commandlinefan a day ago

    I noticed that right away, too - I didn't know you could force backdates of git history like that.

    • mananaysiempre a day ago

      The GIT_AUTHOR_DATE and GIT_COMMITTER_DATE environment variables[1] are what you use for things like that. (The former can also be overridden by the --date= option to git commit, and there’s also various situational stuff like --reset-author for git commit or --reset-author-date and --committer-date-is-author-date for git rebase. No, that last one is not parody.)

      [1] https://git-scm.com/docs/git-commit#_commit_information

    • Tor3 a day ago

      I have source I wrote using SCCS as version control, which later was moved to CVS, preserving the commits as well as commit dates, and at some point moved to Git, again preserving commits and dates. So some of my personal Git repositories have commit entries going back to the late eighties.

      For any ordinary commit you can simply include "--date=" with the 'git commit' command, e.g. -m "This is an old change" --date="2001-03-02 18:05:47"

      • pavon a day ago

        I have definitely not done this to fake TDD-ordered commits. Nope not me.

    • meesles a day ago

      All git data can be modified

thought_alarm a day ago

I'm very surprised it's organized as just a single 162 kB source document instead of being divided into smaller modules to make the code easier to work with, speed up build times, etc.

Were PDP-10 text editors of the day able to easily work with such large documents? And how long would it typically take to assemble all of that code in one go?

  • cardiffspaceman a day ago

    I don’t think TECO is inherently bad for this size of file. What might be tough is, if anything were compute-bound, and the processor were loaded down with other jobs, you could have the usual timeshare-related problems. If you wanted to look at a chunk of text, it would be a problem to send it to your TTY.

    If you were using a KA10 variant, your process could get evicted pretty easily because the core memory requirements of all the running jobs had to be less than 256K words. The variants with paging would have a more efficient method for virtual memory.

    Compile times would be affected by the same issues.

jelder a day ago

I really appreciate that they bothered to set an artificial timestamp for these git commits, roughly 30 years before Git itself existed. The thing is, the other files do, too, and the .gitignore is full of hilariously anachronistic references.

glimshe a day ago

This is great. I've been around since the BASIC days and I always found awesome that most older personal computers had a programming language available within seconds of turning the computer on!

I did a lot of hobby programming in BASIC. But I wonder how many commercial applications were written with it. Did small or big businesses write their own BASIC programs for internal needs?

  • WorldMaker 14 hours ago

    Enough small businesses wrote little BASIC programs that Visual Basic was a huge deal for small businesses at the time. There were a lot of business apps written in VB. There are still a weirdly high number of business apps written in VBA for Access and Excel each year in some industries.

  • turbo_wombat a day ago

    The original version of Ultima I was written in a mixture of BASIC and assembly. BASIC is pretty slow, but most BASIC implementations let you call into optimized assembly routines.

    Though, past a certain point of complexity, performance aside, assembly might be more readable than BASIC because BASIC relied on line numbers for jumping around, whereas assemblers offered named labels.

    • CamperBob2 a day ago

      The original version of Ultima I was written in a mixture of BASIC and assembly.

      True that. Who could forget "One moment for house-cleaning!" as it ran a FRE(0) every time you saved.

      (... uh, everybody?)

  • HankStallone 15 hours ago

    I think there were a lot of small commercial applications if you count programs you could order from the little ads in the back of magazines. BASIC was fine for something like a recipe or address database, that didn't involve any graphics or sound.

    • int_19h 13 hours ago

      BASIC had great facilities for both graphics and (matching the hardware of that era). Various simple primitives like LINE and CIRCLE baked into the language itself, the PLAY statement, ON PEN for light pens and ON STRIG for joysticks. There were quite a few video games for the likes of C64 and ZX Spectrum written in BASIC, usually with machine code snippets for perf-critical stuff.

smokel a day ago

I'm really hoping that this will perhaps lead to other BASIC implementations being open sourced as well.

I've written a fully functional emulator for my first love, the Philips P2000T [1], but never released it because I couldn't find a legal way to distribute it. Most software for this machine requires the BASIC ROM, and even reverse engineering it might not be entirely legal.

If anyone knows where to address my requests to Microsoft, I'd be very happy to hear that.

[1] https://en.wikipedia.org/wiki/Philips_P2000

  • mrandish a day ago

    > perhaps lead to other BASIC implementations being open sourced as well.

    A good start would be for MSFT to also open source the related BASIC-68 and BASIC-69 versions.

    > "The extended 8 KB version was then generalized into BASIC-80 (8080/85, Z80), and ported into BASIC-68 (6800), BASIC-69 (6809), and 6502-BASIC." - https://en.wikipedia.org/wiki/Microsoft_BASIC

  • ChickeNES a day ago

    Well, no reason you can't distribute the emulator and let the user provide the rom, right? If MAME can do it, why can't you?

  • mrandish a day ago

    P2000 appears to be at least partially emulated in MAME: https://emulation.gametechwiki.com/index.php/Philips_P2000_e...

    Here's a video of it running: https://www.youtube.com/watch?v=PUa9Ktmsxww

    The ROM seems to be available via the usual unofficial sources for MAME-supported ROMS: https://wowroms.com/en/roms/mame/download-philips-p2000t/974...

    I'd suggest leveraging the MAME distribution model (distributing emulators separately from copyrighted ROMS). You could also contribute the abandonware software titles you've preserved to the MAME Software-List: https://docs.mamedev.org/contributing/softlist.html. There's no sense in re-inventing the processes and standards the preservation community has already established. Plus once you start the ball rolling, the active community of people trying to preserve cassette-based software from niche 8-bit platforms can join in.

    Of course, getting ROM distribution officially blessed by the corporate owner of record would be lovely but it rarely happens because of the legal complexities involved. Obviously, there's zero commercial value anymore but it's still much easier for a corporation to tacitly look the other way than to grant express permission.

  • asdefghyk a day ago

    Maybe a Microsoft employee could give some hints?

    Anyway, Id start with the Microsoft CEO. Id even email Bill Gates - he would have to"have some sway" if you could get his support - maybe internally ...?

    May be the old authors of the software could request it be released. Is it know who the authors of the ROM was? OR Even other hardware designers / workers who worked on original system - would bring interest to Microsoft and have to have some kind of positive momentum to such a request.

    Is it possible to work out the reasons how other old Microsoft software was released ? I imagine there would be reluctance to release anything that they thought had commercial value?

    As several products have been released over the years - there must be some offical or unoffical process

    Legal would have to have input

    I imagine there would be some close examination of software to verify , no negatives against Microsoft would / could he harboured in code OR found.

    So it would take some resources - maybe several days as a guess - but I really have no idea ... For example probably would want to verify it can be rebuilt - maybe?? would need to setup old toolchains , old hardware etc

    Also Some of these software may have been lost - could be embarrassing for Microsoft to admit this.

    {Aside - I used to work as a software configuration manager for a larger company - whose job it was to ensure all project code was collect, ensure we capture all the artifacts ( source and deliverables etc ) so it could be reliably independently rebuilt. This included all needed tools etc etc]

    • smokel a day ago

      Thanks for the suggestions. I tried my very best a few years ago, and the release of 6502 BASIC has lifted my spirits a bit, so I'll try again and see where it gets me :)

      Unfortunately, the outlook for most Philips P2000T software is rather bleak, at least from a legal standpoint. The machine enjoyed only limited popularity, and commercial developers showed little interest in supporting it. As a result, much of the available software, particularly games, was written by hobbyists, and sharing through copied tapes was common practice.

      In the Netherlands, where the P2000T had its strongest following, copying software was legally permitted until 1990. After that, it became prohibited. Complicating matters further, many original developers released their programs under pseudonyms and provided no contact details. One can obtain quite a lot of this software by buying second-hand machines and tapes. However, redistribution is not legally allowed. As the magnetic tapes gradually degrade, many titles risk being lost forever.

  • tom_ a day ago

    Regarding other BASIC versions: it's probably-abandonware rather than open source, but the (more than slightly inscrutable) source code for Acorn's 8-bit BBC BASIC is here: https://github.com/stardot/AcornDmosBasic (there are commented disassemblies available - you would probably find those more illuminating...)

    (BBC BASIC is pretty horrid by modern standards, but you'll probably still like it more than Microsoft BASIC. Has arbitary length variable names, multi-dimensional arrays, integer variables, PROCs, FNs, and an inline assembler.)

    • billygoat a day ago

      Atari Basic source with comments was published [1] in 1983. Literally published, as a spiral bound book! Teenage me learned a ton of 6502 from that book, back when learning 6502 was hugely useful!

      The book has intro chapters describing the entire design, bugs that snuck in, etc.

      While this code dump is cute, and MS basic more widespread (at the time), the overdone readme and the 48 year delay make it a lot less interesting

      [1] https://archive.org/details/ataribooks-the-atari-basic-sourc...

  • shanselman a day ago

    which basic rom is needed?

    • smokel a day ago

      It's the P2305 cartridge, originally sold as "Module microsoft basic interpreter" [1], [2]. It's jointly copyrighted by Microsoft and Philips.

      I have discussed this with Philips [3] a few years ago, and they were open to sharing it, but I could not find a contact at Microsoft.

      [1] https://archive.org/details/20230420_20230420_1351

      [2] https://www.retrocomputing.nl/p2000-basic-cartridge/

      [3] https://github.com/philips-software

      Edit: for reference, the startup screen shows

        PHILIPS CASSETTE BASIC
        Versie 1.1 NL
      
        14966 bytes vrij
      • jdswain a day ago

        It's likely that is is mostly just the standard Microsoft Basic with some modified I/O routines. Since Microsoft Basic is now under the MIT license you are free to modify the code, it may be relatively easy to re-implement the I/O routines and have a legal 'recreation' of the P2305 cartridge.

        • smokel a day ago

          This particular machine is Z80 based and not 6502, so it's not trivial to port.

          I've looked into building my own BASIC implementation and got quite far with that. Unfortunately, most games that were written back then rely on timing that is near impossible to recreate at that level. Emulating cycle exact Z80 behavior and then having the original BASIC routines on top of that is a far easier route.

      • asdefghyk a day ago

        Jointly copyright would have to make it moore complicated ....

unleaded a day ago

Is this actually new or just a rerelease/relicense? I assumed they always released the source code for Microsoft Basic but maybe not. At least they did for the 6809 version https://colorcomputerarchive.com/repo/Documents/Books/Unrave...

  • ndiddy a day ago

    Those are all disassemblies, not the original code (although the original code for 6809 BASIC was recently found, see https://github.com/davidlinsley/DragonBasic). Similarly, the blog post links a version of 6502 BASIC by Michael Steil on Github that's set up to build the BASIC ROMs for a variety of computers, but that appears to be based on a disassembly rather than the original code as well. Here's a random bit of code (the code handling processing a FOR statement) from Microsoft's repo, vs. the same code from Steil's repo: https://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm... https://github.com/mist64/msbasic/blob/master/flow1.s#L3

  • LocalH a day ago

    I think it was released in scanned form from a printed document (or maybe that was 8080 BASIC), this is the first I've seen in digital text form.

    • LocalH a day ago

      Ok, so the scanned version was indeed 8080 BASIC. However, the 6502 source has been available unofficially since at least 2015. https://www.pagetable.com/?p=774

      Nice to see it out there under the MIT license, certainly. This makes it legal to actually use in many scenarios where it wouldn't be legal to use it previously.

giancarlostoro a day ago

I'm trying for Visual Basic 6 to show up on GitHub someday.

  • networked a day ago

    VB6 is as stretch, but I'd love to see Microsoft Visual Basic 1.0 for MS-DOS open-sourced. It is the only DOS version of Visual Basic. What is remarkable about VB for DOS is that it's a complete text-mode RAD IDE [1] for TUIs. There is no TUI builder that I know of like it. It is obscure and barely discussed by retrocomputing enthusiasts. Your best resource outside of early-1990s books and magazines is a 2020 blog post [2] that demonstrates building a "Hello, world!" project with screenshots.

    [1] https://en.wikipedia.org/wiki/Graphical_user_interface_build...

    [2] https://www.cloudwisp.com/exploring-visual-basic-1-0-for-ms-...

    • tom_ a day ago

      Add me to the VB for DOS fan club! I was a user in the mid to late 90s. TurboVision was beyond me at the time (I didn't really know Pascal well at all, and I wasn't good enough at C++), but VB for DOS was just the ticket (mostly) - the language was not terrible, and the form designer was super easy to use. Much easier than me attempting to recreate a nice text UI in C. I wrote a few programs in it.

      I do recall the 640 KB barrier being a limitation. I've forgotten the exact details, but, as I recall, the docs implied it shouldn't generally be an issue - but in practice it was. And it'd always be a problem at the most annoying time.

      (But it could just have been some large model thing that experienced real mode fiends would instinctively know to avoid? Coming from a 68000 background, for DOS stuff I'd used Borland's huge model or a DOS extender of some kind, to avoid the segmentation one way or another. Maybe that was the problem.)

      Despite the occasional problems I had, I always generally liked it, and felt the UIs I created with it looked really rather nice.

    • qingcharles a day ago

      That's wild that it passed me by. I've never seen that before. I used the Windows version from 1.0, but all my main development was still in TUI apps like Borland until about 1995.

      Funny that the DOS version came out after the Windows one.

      It amuses me that I'm sat here at my desktop right now using the exact same interface in Visual Studio 34 years later to build a WinForms app.

    • asdefghyk a day ago

      Microsoft Visual Basic 1.0 for MSDOS -

      Sounds like competitor For Vermont Views or the previous product Windows for Data and windows for C

      No sure of the names ... my recollection this software was in use in early 90s and maybe late 80s

      • asdefghyk a day ago

        Google of 3 words Vermont Views, software still picks up several links

        Borland Turbo Pascal and Borland Delphi where also (similar) products from around that time. These products where popular at the time. ( The development system provide include some kind of windows system for the application )

        Microsoft even hired key Delphi person ....

  • hu3 a day ago

    Same. This got me smiling, from some days ago:

    Visual Basic 6 rebuilt in C# – complete with form designer and IDE in browser

    https://news.ycombinator.com/item?id=42105869

    • giancarlostoro a day ago

      I would honestly spend money to get access to the VB6 source if that's what it takes to get Microsoft to fund open sourcing it. One key thing was that VB6 was the first version that wasn't using P-Code but was actually compiling natively into an EXE.

      I like to imagine that there was actually a VB7 in the works with a lot of enhancements to VB6 that we just never got to see once Microsoft dropped .NET and made VB .NET a thing.

      • int_19h 12 hours ago

        VB5 was the first version with native .exe generation. Although P-code vs native didn't make as much of a difference as one might think because the generated code was really slow; not in the ballpark of Delphi even.

        The amusing thing about native VB is that Win32 is still, to this day, carrying a bunch of APIs (Var*) that essentially encode its semantics on Variants, e.g.: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/...

      • WorldMaker 14 hours ago

        The first VB.NET release was versioned VB7, every hint we have shows that the team at Microsoft felt they were building the next version of VB. Given VB6's deep reliance on OCX/ActiveX, .NET was seen as the future of that and the fix for a lot of the bugs and problems of OCX/ActiveX.

        • int_19h 12 hours ago

          Indeed, VB6 was essentially BASIC with OLE Automation object model bolted on.

          (Which itself was designed to a large extent to match what VB was doing before, so it's a bit circular).

          And let's not forget that .NET grew out of the "COM 2.0" project. Which started in 1998, at the same time VB6 was released.

SSLy a day ago

that Readme smells of LLMs and elderberries

  • cube00 a day ago

    QuillBot reports 100% AI for section "Why This Document is Historically Important"

  • lloydatkinson a day ago

    > It democratized programming

    Yawn. Everything “democratizes” everything these days.

    • petcat a day ago

      I think it commercialized programming. True democratization didn't really happen until Stallman, GCC, and the GPL.

      • criddell a day ago

        It definitely democratized programming. There were a lot of us buying home computers and writing little programs that nobody ever saw. Nothing commercial ever came of the little utilities or games we made.

        Before we got our home computer, the closest I ever got to a computer was reading about them in the encyclopedia.

        What Stallman did a decade later was great if you happened to have access to the type of computer that could run Emacs. Even then, you probably didn't own the machine and maybe even had to pay for time on it by the hour. The small machines that ran Microsoft Basic were in people's homes.

        • HankStallone a day ago

          Yeah, my Commodore 128 came with a 400-page system guide, nearly half of which was a BASIC reference and programming tutorial that explained concepts like looping and arrays. Those computers assumed you might want to program at least a little, and tried to make it easy to get started, so a lot of us did.

          • criddell 15 hours ago

            The original IBM PC came with a technical reference book that had full schematics and BIOS source code!

        • fl7305 13 hours ago

          > What Stallman did a decade later was great if you happened to have access to the type of computer that could run Emacs. Even then, you probably didn't own the machine and maybe even had to pay for time on it by the hour. The small machines that ran Microsoft Basic were in people's homes.

          No, a decade later was at the end of the 1980's. At that time, many middle class families could afford home computers like the Atari ST, which could run many of the GNU compilers/tools.

          It was a great learning experience porting Unix apps and games to the ST.

          • criddell 10 hours ago

            Atari ST support wasn’t added to GNU C until 1993 with Multi TOS. It was largely the work of Eric Smith.

            You might be thinking of basic Motorola 68000 support which GNU C did have in the late 80’s but you couldn’t build a set of GNU tools that ran on the ST with it.

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

      • PaulHoule a day ago

        BASIC put programming in reach of a wide range of people. Steve Wozniak himself documented his personal progression from implementing a Breakout game with gates (see [1]) to implementing it in 6502 assembly to implementing it in BASIC [2]

        You could have that BASIC experience on a minicomputer like the PDP-8, 11, or 20 which you might have at a high school or college earlier but with microcomputers you could have it in elementary school or at home.

        [1] https://thedoteaters.com/?bitstory=bitstory-article-2/breako...

        [2] http://blog.hardcoregaming101.net/2012/09/basic-history-of-b...

    • dmbche a day ago

      How about when they invented BASIC

      • spogbiper a day ago

        by "they" do you mean Kemeny and Kurtz at Dartmouth, back in the early 60s?

        • zozbot234 a day ago

          Kemeny and Kurtz's BASIC was an ahead-of-time compiled language which ran on time-shared machines; mainframes at first then smaller "mini"-computers. The typical interpreted BASIC for microcomputers was quite a bit simpler than that.

        • dmbche a day ago

          Pretty sure linguistically the important bit is "when" and the "they" is not defined

          Like when awaiting pizza delivery, "they're here in 10 mins" doesn't directly relate to a specific guy

          Could be wrong though

          And no, to answer your question

AbraKdabra a day ago

The "48 years ago" detail for the commit date is genius.

  • shanselman a day ago

    thanks!

    • kangs a day ago

      i believe the markdown docs weren't 48y ago though /pedantic-scarcasm

breadwinner a day ago

I don't see any credit being given to Digital Equipment Corporation (DEC) upon whose work this is based [1] [2] [3].

The quotes below only talk about OS source code, but they found language interpreter source code as well, see register story.

> "So, for a few years that is where I spent my time. 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. Really not just banging away to find bugs like monkeys[laughs], but actually studying the code to see what was wrong." [4]

> "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"

[1] https://en.wikipedia.org/wiki/BASIC-PLUS#Comparison_to_MS_BA...

[2] https://everybasic.info/doku.php/basics/decbasic#influence_f...

[4] https://americanhistory.si.edu/comphist/gates.htm

[3] https://www.theregister.com/2000/06/29/bill_gates_roots/

[5] https://paulallen.com/Futurist/Microsoft.aspx

  • ndiddy a day ago

    The Microsoft BASIC language is similar to DEC BASIC, but the actual implementation is completely different. For example, DEC BASIC compiles the BASIC source code into bytecode as it's entered for faster execution, while Microsoft BASIC is a pure interpreter that simply interprets the source code tokens at runtime. You have to remember how different the memory-constrained 8-bit microcomputers were from a PDP-11. Even if Gates looked at the DEC BASIC source code, there wasn't much there that he could have used.

  • LocalH a day ago

    A piece of software closely matching the interface of a different piece of software doesn't automatically make the former based on the latter, except in an abstract sense (in which almost all ideas are derivative in some ways, because everything builds on the shoulders of giants). What is this, the CP/M vs MS-DOS argument again? I'm not Gates' biggest fan in terms of his ruthless business acumen, but claims of plagiarism, however slight, need a bit of hard evidence to be anything more than a smear.

    • breadwinner a day ago

      If you look at the source code of a program, learn how it works, and then you make your own program with the same functionality, is your program "based on" the original, or is it independent work?

      • LocalH a day ago

        If you make a program that uses the same syscall setup as another, but the code is different and not copied, is it "based on" the original, or independent work?

  • bbanyc a day ago

    The most significant contribution that DEC BASIC made was the REPL-like "immediate mode" that lets you execute individual statements without having to RUN the whole program. It was copied by both Microsoft and almost every other BASIC implementation since. Being able to fiddle around with "PRINT 2+2" is so fundamental to the BASIC experience that it surprised me to learn that Kemeny & Kurtz didn't come up with it, DEC did. (It came from DEC's earlier language FOCAL, which had an "English-like" syntax and doesn't resemble BASIC in any other way, and probably ultimately from LISP.)

    • EvanAnderson a day ago

      Kemeny and Kurtz BASIC was compiled so the lack of a REPL makes sense.

  • phkahler a day ago

    In that Basic 80 link (number 2) I would have expected another variant to be listed: Microsoft Basic for the Interact Home Computer which used an 8080 processor. BTW I still have my Interact in its box and the MS Basic on tape and some other stuff. Looking for a museum or appropriate place to send it.

    • wvenable a day ago

      I saw an ebay listing for one of these Interact computers today and spent a little time learning about it on YouTube. It's so strange to see your post on the same day about a computer I didn't know existed yesterday.

    • criddell a day ago

      Chances are the tape is no longer readable.

  • reaperducer a day ago

    digging out the operating system listings from the trash and studying those.

    A lot of us did the same thing in that era. It's surprising how much information can be learned from what others think is useless.

    Thank you SUNY New Paltz and the IBM submarine facility (no idea what it was called) for not securing your Dumpsters. It's how I learned computing before it was taught in schools.

    • breadwinner a day ago

      Back in those days, software was just an accessory to hardware, not something that was valuable and could be sold by itself. So they would not have thought to secure their dumpsters.

      Bill Gates played a significant role in jumpstarting the commercial software industry, especially with his "An Open Letter to Hobbyists" in 1976, which urged people to pay for software.

      • reaperducer a day ago

        We pulled a lot of hardware out of those, too.

        ;)

  • dboreham a day ago

    > upon whose work this is based

    Erum, none of your references show this (or come remotely close).

    MS did base NT on DEC work, and settled a court case as a result. Perhaps you're thinking of that story?

    BASIC the language pre-dates the DEC implementation (it came from Dartmouth College), and nobody would reasonably think that seeing the code for a high level language BASIC interpreter implementation for Machine A, then writing an assembler implementation for Machine B means you "based it on their work".

    • monocasa a day ago

      MS BASIC is widely considered to have been based on the internal structure of DEC BASIC.

      • whartung a day ago

        It may be widely considered, but that doesn't mean it's an accurate assertion.

        The internal structure of DEC BASIC PLUS is a far, far cry from what MS-BASIC (MSB) is. Outside of some shared syntax, the implementations are night and day.

        BASIC+ (B+) is compiled to p-code, not tokenized and then interpreted. Those are completely different runtime approaches. B+ has a raw text source that is edited and maintained by the runtime, MSB does not. After you hit ENTER on MSB, your "source code" is gone. It's converted, and not necessarily losslessly, into an internal tokenized form. That tokenized form is read and recreated into the source lines you see when you LIST the program.

        This scratch text file for the B+ program actually allows B+ to work in even more memory starved environments than MSB because the text is never fully loaded into RAM, so the bulk of RAM is compiled byte codes and data. You also don't have to "pay" for having extra spaces in your code, as the raw text does not impact that actual runtime size in contrast to MSB tokenized form.

        B+, being compiled, supported much different styles of things like loops and if statements.

          10 ODDSUM=ODDSUM + A(I) IF A(I) MOD 2 = 0 FOR I = 1 TO 10
        
        MS-BASIC can not handle that properly with it tokenizer based system.

        On the surface, they look similar with their interactive development environment. Internally, it was a completely different story.

      • leoc a day ago

        Right, though there's two or three different questions here: whether DEC BASIC influenced MS BASIC, whether MS should have acknowledged that today, and whether DEC BASIC's influence on MS BASIC amounted to a copyright violation. On the last question, my guess would be that there's at least a reasonable argument that MS' use of the DEC BASIC code was transformative enough to get it off the hook, but IANAL. To the extent that it is in a grey area, honestly that's probably a good reason for MS to keep a diplomatic silence about any possible DEC influence today.

        • reaperducer a day ago

          there's two or three different questions here

          Only if you weren't there.

          You won't find the answers to everything online.

          • leoc a day ago

            But that doesn't mean that there aren't two or three questions, just that there there are answers to which I, and most people here, aren't privy. And, sure, that wouldn't come as a suprise.

  • DonHopkins a day ago

    https://news.ycombinator.com/item?id=17998940

    DonHopkins on Sept 16, 2018 | parent | prev | next [–]

    Speaking of weird BASIC features, does anyone know why DECSYSTEM 20's BASIC had a "LISTREVERSE" command?

    Yes, it actually did exactly what it sounds like!

    Chalk one up for DEC and BASIC. What other programming languages support that feature, huh?

        DECSYSTEM 20 BASIC User's Guide: LISTREVERSE command
    
        LISTREVERSE
        LISTNHREVERSE
    
        LISTREVERSE and LISTNHREVERSE print the contents of the
        user's memory area in order of descending line numbers. 
        LISTREVERSE precedes the output with a heading,
        LISTNHREVERSE eliminates the heading.
    
        LISTREVERSE
    
        EQUIV             10:53                      13-NOV-75
    
        40    END
        35    PRINT "THE EQUIVALENT CURRENT IS",I, " AMPERES"
        25    I=E1/R
        10    INPUT R
        5     INPUT E1
    
        READY
    
    http://www.bitsavers.org/www.computer.museum.uq.edu.au/pdf/D...
    • rootbear a day ago

      All I can think of is that it was a way to look at the end of a long program which wouldn't all fit on a display. Predating, I suppose, the 'tail' program, or whatever the DECSYSTEM 20 equivalent was.

      • leoc a day ago

        I assume that it would be clearly useful if your terminal was a slow paper teleprinter. Once you got used to reading listings with the lines in reverse order, which shouldn't really be very difficult, LISTREVERSE would let you start reading from wherever you had got up to in your partly-completed listing, then cancel whenever you'd got enough context, instead of having to guess in advance how far up the program you'd want to look. You could even then print out the same range of lines again unreversed, if you wanted.

    • reaperducer a day ago

      When you want to see the beginning of the program, but the terminal you're using is too laggy to send ^S in time to pause the listing?

      • JdeBP a day ago

        Unlikely. LIST and LISTNH took an optional line number range.

jeffwass a day ago

This is cool, my Dad has an old OSI (Ohio Scientific) computer circa 1978 that likely used this or similar version of BASIC. He fired it up a couple of years ago and it booted to the welcoming Micro-Soft message (I think it had a hyphen like that).

drittich a day ago

I cut my teeth on that language, and still keep a Commodore PET around for old times sake.

  • eggy a day ago

    I had my Commodore PET for 10 years from 1977 to 1987 until I went away and my cousin borrowed it, and then believing I was not coming back to the US from Spain, sold it!

    I loved the cassette drive and all-in-one chassis. Ah, typing in programs from magazines and creating programs from scratch with PET graphics on the keys! I miss those days. So much wonder and fun.

    • drittich a day ago

      And recording software applications to cassette off the radio!

  • usr1106 a day ago

    I did self-learned programming on an PET with the half-sized keyboard and cassette deck at highschool starting 1980. After 3 weeks or so I had filled the 7 KB of memory and needed to optimize GOTO commands by rearrangign the code. Every digit in the line number took 1 Byte, so many GOTO 20000 were wasteful. The trick to reveal the Microsoft text was known, but nobody knew what company that was. The PC did not exist yet.

    My next step was Pascal on a VAX at Uni. Never looked back to PET or Microsoft. Linux user today.

busfahrer a day ago

I believe there is also some connection between this and the Apple II. It shipped with "Applesoft BASIC", which was provided by Microsoft and was a dialect of MS Basic for the 6502, so I'm guessing that there has to be at least a bit of overlap here.

ksherlock a day ago

While the bullshit generator might think it's "Compatible with period assemblers for 6502 development", that's a weird-ass cross assembler. For my money, a commented disassembly like https://6502disassembly.com/a2-rom/Applesoft.html using a more standard assembler is easier to read. It's interesting to compare the two though.

  • ksherlock a day ago

    to expand on that, this assembler include the address mode as part of the instruction opcode rather than as part of the operand.

    normal:

        lda #0        ; load accumulator immediate
        lda (index),y ; load accumulator indirect,y
    
    weird:

        ldai 0        ; load accumulator immediate
        ldady index   ; load accumulator indirect,y
    • zozbot234 a day ago

      It's not that weird, and it's a lot simpler. It maps directly to how the opcodes are represented in the binary machine code and saves the effort of parsing and pretty-printing the standard syntax. With a different ISA one might argue that there's simply too many insn+addressing mode combinations to represent each with its own mnemonic, but this doesn't really apply to something as simple as the 6502.

      • tom_ a day ago

        I'd say it's definitely weird for a standalone assembler. For standalone 6502 assemblers, some approximation of the standard MOS-type syntax has always been near-universal. Though you're quite correct about some of the advantages of doing it this way.

        (I say "near universal", because Acorn's MASM had a similar syntax. (See, e.g., https://github.com/stardot/AcornDmosBasic/blob/master/src/DB...) I don't remember ever seeing that described as anything other than an oddity.)

        And, also, there are probably assemblers smooshed into Forth or Lisp (or implemented with assembler macros for an assembler targeting some completely unrelated CPU) that work in a similar way, because you're limited by the pre-existing syntax rules. But that feels like a separate category

        • kazinator a day ago

          The standard 6502 assembly is already "weird" in that some operands are rolled into the opcode, but some are arguments.

          E.g. various register-register transfer combinations have dedicated mnemonics: TXA, TAX, etc.

          LDA (index),Y. has index and Y in the argument space, but the A operand is in the mnemonic. The comma doesn't separate operands but is a displacement operator.

          In other words, we really want LD A, (index) + y. Or LD A, (index + x).

    • LocalH a day ago

      I remember having a package in the old C64 days (can't remember the name of it though), and the assembler used "LDAIM" for "lda #" etc. Not identical syntax, but it's not outside of the realm of feasibility.

desmondmonster a day ago

What editor did they use to write this code? I think this predated vi, and folks were probably using older tools they were familiar with. ed? How much of the source code could they see at once? Was there such thing as a "full screen editor"? If anyone can illuminate the development environment/workflow from the late 1970s I'd love to hear about it.

FrankyHollywood 19 hours ago

For more background on the development read Idea Man from Microsoft co-founder Paul Allen, a really interesting read (at least the first half of the book, later chapters are describing how he spends his money being a billionaire)

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

omega3 a day ago

Looks like the comments were sanitized but they missed some:

> CHKVAL: BIT VALTYP ;WILL NOT F UP "VALTYP".

  • LocalH a day ago

    According to https://www.pagetable.com/?p=774 that is actually in the original source written like that (as I would assume the copy of the source Steil posted about in 2015 was not sanitized).

gadders 20 hours ago

The connoisseur's MS Basic was the version for the 6809 processor.

[Repping the Dragon 32 still]

chris_st a day ago

First assembly language I learned was 6502 for the Apple II. Brings back some memories (...once I scrolled way way way down to actual 6502 code!).

DrillShopper a day ago

I cannot recommend enough Ben Eater's 6502 computer build on YouTube[1] if you want to play with a 6502 computer from the ground up. It is meant to be accessible to the ambitious amateur. It is roughly Apple 1 compatible, and he has videos on how to add new commands in Microsoft BASIC as well as how to modify Microsoft BASIC to support the computer.

Seeing him git clone Microsoft BASIC and make the changes atop it was definitely a weird but awesome moment.[2]

[1] https://youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1...

[2] https://youtu.be/XlbPnihCM0E

  • drujensen a day ago

    100%.

    3 years ago I modified his 6502 breadboard project and added a keyboard, display and then I modified MS Basic to get it to run. Also, I found a way to extend the RAM to 31kb. I called it eater-one.

    All of his videos and kits are a must if you never understood how a cpu works. I highly recommend them.

    https://github.com/drujensen/eater-one

mikesabbagh a day ago

I had such a good time on my Commodore 64

JKCalhoun a day ago

Happy to see it works for the KIM-1.

qingcharles a day ago

Anyone figured out the build process yet? I only know TASM/MASM.

lysace a day ago

That recent "purchase of Commodore" by some Youtuber... it doesn't really include the distribution rights of the C64 ROM containing (a newer version of) this 6502 Basic, right?

  • fredoralive a day ago

    IP of the original Commodore kinda got scattered after the breakup in the 1990s. The Youtuber AIUI have the trademarks, so they can call themselves Commodore, and sell Commodore branded computers.

    The original C64 ROMs (along with AmigaOS) are owned by a company called Cloanto. (Well, I suspect with Amiga OS in particular, it's probably more complicated than that). Not sure if you have to licence MS BASIC separately, or if the favourable deal Jack Tramiel negotiated way back when still covers it.

    This split is why the mini C64/A500 units a few years back had actual Commodore software, but didn't have Commodore branding, as they could get a deal with Cloanto, but not the previous owners of the C= logo etc.

    • zozbot234 a day ago

      The new Commodore folks seem to be on friendly terms with Cloanto, so this MIT-licensed release from Microsoft is great news for them and I wonder if it was partly instigated by the Commodore developments. If only because, in principle, it saves everyone the effort and cost of having a difficult negotiation over something as silly as the purported IP value of those old BASIC ROMs.

      • snvzz a day ago

        It is a shame that, even today, none of these Commodore or Amiga ROMs are open source, or even free to use/distribute.

        • LocalH a day ago

          They're easy to find if you want them. If you ever owned any of the relevant machines, then I'd say you're even morally in the correct. Feel free to send Commodore or Cloanto some cash for your use if you feel so inclined. Cloanto even offer packages for both C64 and Amiga that include the most relevant ROMs (and Workbenches, in the case of the Amiga).

        • zozbot234 a day ago

          It's obviously inconvenient but I wouldn't call it "a shame". It's historically quite normal, open source/free to use just wasn't a common thing back then.

mzajc a day ago

> SECURITY.md

Never change, bureaucracy :)

DrNosferatu a day ago

Now release the Z80 port!

  • mrspuratic a day ago

    A long time ago my uncle gave me his old Exidy Sorceror, Z80/S100 system. It came with MS BASIC V1.0 on a ROM cartridge. Sadly I never copied the image. Sold it to a collector in Germany IIRC.

cyberax a day ago

I think, it's the first time I saw "48 years ago" in the most recent change column on Github.

LeoPanthera a day ago

That readme is obviously AI generated. I’m happy for anything this historical being open sourced, but I now wonder what the AI has done to the code itself. What a shame.

  • NitpickLawyer a day ago

    Well, we can be pretty sure it didn't touch comments :)

    > 12/1/77 FIXED PROBLEM WHERE PROBLEM WITH VARTXT=LINNUM=BUF-2 CAUSING BUF-1 COMMA TO DISAPPEAR

  • pjmlp a day ago

    They now have OKRs to use AI everywhere, even .NET tooling is getting AI tainted.

  • ocdtrekkie a day ago

    I assume AI only generated the readme file. But I would say if AI boilerplate eases Microsoft releasing more of their old code to the public, I am okay with that.

    Microsoft recently closed a 7 year old .NET documentation bug I opened using Copilot. I am not a fan of AI but the submitted fix was far superior to the basically useless message that had been previously present, so net positive. At being ignored for 7 years, it was unlikely to get better from human effort.

    • LeoPanthera a day ago

      I wouldn't assume that at all. If they're using AI for something as trivial as a readme, I think it is a very safe assumption that that's not all they're using it for.

      I wish code repos had a "contaminated by AI" flag.

  • DonHopkins a day ago

    Why do you have any reason to believe AI generated any of the 6502 code? What possible reason or motivation could there be for that? Wouldn't it spoil the entire reason for releasing it, totally miss the point of releasing original historic code? Who might possibly benefit by doing that? Are you just making up baseless conspiracy theories or do you have any factual basis for that accusation?

    Seems hypocritical for a human being to hallucinate a conspiracy theory about LLMs, with no evidence whatsoever.