9 ms·
Microsoft BASIC for 6502 Microprocessor – Version 1.1
https://opensource.microsoft.com/blog/2025/09/03/microsoft-open-source-historic-6502-basic/ https://opensource.microsoft.com/blog/2025/09/03/microsoft-o...
- johnklos 1y agoMaybe I should try to port this to the 65CE02 on the Commodore A2232 seven port serial card. It could use one of the serial ports for BASIC input and output. If I wanted to get fancy, I could even use the Amiga side to load and save programs from the A2232's 16K of memory...
- tracker1 1y agoDefinitely nice to see this as an official release from MS. https://github.com/microsoft/BASIC-M6502 https://github.com/microsoft/BASIC-M6502
- pico303 1y agoI love how the initial commit is "48 years ago."
- achrono 1y agoI love even more how it's a .md file from well before Markdown even existed.
- perching_aix 1y agoI bet it being a Git repo must straight up feel otherwordly then. It's just a nice touch.
- prerok 1y agoNo, 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 1y agoWay before git was even released in 2005.
- xattt 1y agoAre 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?
- badc0ffee 1y agoEven if it was a 32-bit timestamp, you could still express dates back to December 13, 1901.
- dgl 1y agoIt'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(+)
- badc0ffee 1y agoAh, too bad. TIL.
- prerok 1y agoYes, 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.
- shanselman 1y agoThanks!
- qingcharles 1y agoScott, you should do this :) https://news.ycombinator.com/item?id=45120440 https://news.ycombinator.com/item?id=45120440
- commandlinefan 1y agoI noticed that right away, too - I didn't know you could force backdates of git history like that.
- BowBun 1y agoAll git data can be modified
- mananaysiempre 1y agoThe 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 https://git-scm.com/docs/git-commit#_commit_information
- Tor3 1y agoI 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 1y agoI have definitely not done this to fake TDD-ordered commits. Nope not me.
- int_19h 1y agoYou might find this repo interesting: https://github.com/dspinellis/unix-history-repo https://github.com/dspinellis/unix-history-repo
- msgilligan 1y agoAlthough 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.
- JdeBP 1y agoIf you enjoyed the datestamps on that repository, you will definitely enjoy the datestamps on this one: * https://github.com/dspinellis/unix-history-repo https://github.com/dspinellis/unix-history-repo You'll also enjoy the contributors list.
- bee_rider 1y agoMan, imagine a 2.5k line kernel. You could probably fully understand how part of the computer works.
- userbinator 1y ago2.5 lines of J, K, or some other APL-family language? https://news.ycombinator.com/item?id=13590065 https://news.ycombinator.com/item?id=13590065
- cout 1y agoHow do you write half a line of code?
- bee_rider 1y agoOdd, I guess my autocorrect got rid of the k. Thanks! Luckily the edit window was still open.
- mmmlinux 1y agoDo you know about half button presses?
- pxx 1y agoAn A press is an A press. You can't say it's only a half
- bee_rider 1y agoI 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).
- ezoe 1y agoI wish they set the author to the appropriate person. I assume Bill Gates.
- canucker2016 1y agoBill 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 1y agoLines 6913-6918: AUTTXT: ACRLF 12 ; ANOTHER LINE FEED. DT"WRITTEN " DT"BY WEILAND & GATES" ACRLF 0>
- canucker2016 1y agofor thoroughness, from https://www.pagetable.com/?p=43#comment-1033 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..
- mandeepj 1y ago< redacted >
- kaszanka 1y agoAnyone can do this by changing the author and committer date. Take a look at https://github.com/dspinellis/unix-history-repo https://github.com/dspinellis/unix-history-repo, linked in the comments here, for example.
- antod 1y agoAt this rate, we could get AmigaBASIC released in about 8yrs.
- SSLy 1y agothat Readme smells of LLMs and elderberries
- lloydatkinson 1y ago> It democratized programming Yawn. Everything “democratizes” everything these days.
- deleted 1y ago[deleted]
- dmbche 1y agoHow about when they invented BASIC
- spogbiper 1y agoby "they" do you mean Kemeny and Kurtz at Dartmouth, back in the early 60s?
- zozbot234 1y agoKemeny 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 1y agoPretty 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
- petcat 1y agoI think it commercialized programming. True democratization didn't really happen until Stallman, GCC, and the GPL.
- hu3 1y agoBlog post: https://opensource.microsoft.com/blog/2025/09/03/microsoft-open-source-historic-6502-basic/ https://opensource.microsoft.com/blog/2025/09/03/microsoft-o...
- dang 1y agoThanks! We'll add that link to the top text above.
- AbraKdabra 1y agoThe "48 years ago" detail for the commit date is genius.
- deleted 1y ago[deleted]
- shanselman 1y agothanks!
- kangs 1y agoi believe the markdown docs weren't 48y ago though /pedantic-scarcasm
- drittich 1y agoI cut my teeth on that language, and still keep a Commodore PET around for old times sake.
- eggy 1y agoI 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.
- usr1106 1y agoI 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.
- LeoPanthera 1y agoThat 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 1y agoWell, 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
- ocdtrekkie 1y agoI 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 1y agoI 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 1y agoWhy 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.
- pjmlp 1y agoThey now have OKRs to use AI everywhere, even .NET tooling is getting AI tainted.
- DonHopkins 1y agohttps://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm#L2417 https://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm... RETURN: BNE GORTS ;NO TERMINATOR=BLOW HIM UP.
- lysace 1y agoThat 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 1y agoIP 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.
- lysace 1y agoThanks. Odd product portfolio: https://cloanto.com/ https://cloanto.com/
- zozbot234 1y agoThe 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 1y agoIt is a shame that, even today, none of these Commodore or Amiga ROMs are open source, or even free to use/distribute.
- 1y ago
- mzajc 1y ago> SECURITY.md Never change, bureaucracy :)
- shanselman 1y agosigh
- jasonjayr 1y agoIf you love that, check out the auto/AI generated issues: https://github.com/microsoft/BASIC-M6502/issues/5 https://github.com/microsoft/BASIC-M6502/issues/5 https://github.com/microsoft/BASIC-M6502/issues/3 https://github.com/microsoft/BASIC-M6502/issues/3 https://github.com/microsoft/BASIC-M6502/issues/1 https://github.com/microsoft/BASIC-M6502/issues/1
- IcyWindows 1y agoAh, they are already deleted. :(
- jasonjayr 1y agoD'oh. One was noting the missing LICENSE, another was noting the missing SECURITY.md, and the other one was a policy bot nagging the repo owner to follow a process to exclude the code from the "Microsoft Internal Github" "to protect Microsoft's property"
- breadwinner 1y agoI 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_BASIC https://en.wikipedia.org/wiki/BASIC-PLUS#Comparison_to_MS_BA... [2] https://everybasic.info/doku.php/basics/decbasic#influence_for https://everybasic.info/doku.php/basics/decbasic#influence_f... [4] https://americanhistory.si.edu/comphist/gates.htm https://americanhistory.si.edu/comphist/gates.htm [3] https://www.theregister.com/2000/06/29/bill_gates_roots/ https://www.theregister.com/2000/06/29/bill_gates_roots/ [5] https://paulallen.com/Futurist/Microsoft.aspx https://paulallen.com/Futurist/Microsoft.aspx
- DonHopkins 1y agohttps://news.ycombinator.com/item?id=17998940 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/DEC-20-LBMAA-A-D%20BASIC%20User's%20Guide.pdf http://www.bitsavers.org/www.computer.museum.uq.edu.au/pdf/D...
- DrNosferatu 1y agoNow release the Z80 port!
- mrspuratic 1y agoA 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.
- giancarlostoro 1y agoI'm trying for Visual Basic 6 to show up on GitHub someday.
- hu3 1y agoSame. 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 https://news.ycombinator.com/item?id=42105869
- giancarlostoro 1y agoI 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.
- WorldMaker 1y agoThe 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 1y agoIndeed, 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.
- int_19h 1y agoVB5 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/nf-oleauto-varcat https://learn.microsoft.com/en-us/windows/win32/api/oleauto/...
- codingwagie 1y agoLove the comments: "7/27/78 FIXED BUG WHERE FOR VARIABLE AT BYTE FF MATCHED RETURN SEARCHING FOR GOSUB ENTRY ON STACK IN FNDFOR CALL BY CHANGING STA FORPNT TO STA FORPNT+1. THIS IS A SERIOUS BUG IN ALL VERSIONS." Not far off from a comment I might make these days https://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm#L212C1-L214C57 https://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm...
- cyberax 1y agoI think, it's the first time I saw "48 years ago" in the most recent change column on Github.
- jelder 1y agoI 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.
- hu3 1y agoSpeaking about .gitignore. What is this? # MightyMoose *.mm.* I could only find this: https://github.com/MonzUn/MightyMooseCore https://github.com/MonzUn/MightyMooseCore Link to the file: https://github.com/microsoft/BASIC-M6502/blob/main/.gitignore https://github.com/microsoft/BASIC-M6502/blob/main/.gitignor... Regardless, thank you Mr. Hanselman. This is great!
- fishgoesblub 1y agoLooks to be for "Continuous Tests" [0] found through git blame [1] [0] https://continuoustests.com/ https://continuoustests.com/ [1] https://github.com/github/gitignore/commit/2183a6c531d7085e2d6f26cb59cc1a25f4b21c18 https://github.com/github/gitignore/commit/2183a6c531d7085e2...
- davey48016 1y agoI think it's that. I don't think that the .gitignore file is meant to reflect anything about when this BASIC interpreter was written, it looks like it's just a MS managed .gitignore that accounts for everything that was ever popular for development in Visual Studio, even things that have been obsolete for decades. In order to handle your most legacy C#, F#, VB.NET, or Visual C++ solutions.
- kubatyszko 1y agoditto! It was really a nice touch (pun intended since touch is what I'd use to produce such timestamps)
- EvanAnderson 1y agoThere'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 https://www.pagetable.com/?p=43
- exitb 1y 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.
- chirsz 1y agoIt would be even better if this easter egg appeared on line 6502!
- LocalH 1y agoThis 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 1y agoThen 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.
- desmondmonster 1y agoWhat 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.
- coldpie 1y agoI don't know my history well enough to answer your question, but you can see one approach to the 1970s computing experience in this excellent video series about the Altair 8800 by deramp5113 on YouTube: https://www.youtube.com/playlist?list=PLB3mwSROoJ4KLWM8KwK0cD1dhX35wILBj https://www.youtube.com/playlist?list=PLB3mwSROoJ4KLWM8KwK0c... There were fullscreen editors. You can see one with a 1978 copyright date at about 14:45 in this video: https://www.youtube.com/watch?v=YQNHg1XuFR4 https://www.youtube.com/watch?v=YQNHg1XuFR4
- kabdib 1y agoin 1978, emacs was a possibility but i'm gonna guess SOS or TECO, if they were running a bog standard PDP-10 OS from DEC
- ksherlock 1y agoWhile 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 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 1y agoto 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 1y agoIt'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_ 1y agoI'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/DBAS03 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
- glimshe 1y agoThis 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?
- turbo_wombat 1y agoThe 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 1y agoThe 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 1y agoI 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 1y agoBASIC 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.
- ChrisArchitect 1y agoWhat's the timeline of BASICs here? I thought GW-Basic was the MS one of my youth after Altair?
- ChrisArchitect 1y agoMore details in the blog post: https://opensource.microsoft.com/blog/2025/09/03/microsoft-open-source-historic-6502-basic/ https://opensource.microsoft.com/blog/2025/09/03/microsoft-o... GW-Basic was the IBM PC port. Kind of more consequential no?
- deleted 1y ago[deleted]
- mikesabbagh 1y agoI had such a good time on my Commodore 64
- omega3 1y agoLooks like the comments were sanitized but they missed some: > CHKVAL: BIT VALTYP ;WILL NOT F UP "VALTYP".
- deleted 1y ago[deleted]
- LocalH 1y agoAccording to https://www.pagetable.com/?p=774 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).
- mococa 1y agoI wrote a replica of the Macintosh in my game using Lua and Classic BASIC on my homemade engine. You can check it here: http://reprobate.site/?stage=pearintosh http://reprobate.site/?stage=pearintosh
- thought_alarm 1y agoI'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 1y agoI 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.
- chris_st 1y agoFirst 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!).
- jeffwass 1y agoThis 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).
- DrillShopper 1y agoI 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=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH&si=W5h273rZQD6_ycvN https://youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1... [2] https://youtu.be/XlbPnihCM0E https://youtu.be/XlbPnihCM0E
- drujensen 1y ago100%. 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 https://github.com/drujensen/eater-one
- DrillShopper 1y agoAnother suggestion is Anders Nielsen's channel - his video on a single breadboard 6502 computer (really a 6507) with a RIOT is really good: https://youtu.be/s3t2QMukBRs https://youtu.be/s3t2QMukBRs
- smokel 1y agoI'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 https://en.wikipedia.org/wiki/Philips_P2000
- shanselman 1y agowhich basic rom is needed?
- smokel 1y agoIt'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 https://archive.org/details/20230420_20230420_1351 [2] https://www.retrocomputing.nl/p2000-basic-cartridge/ https://www.retrocomputing.nl/p2000-basic-cartridge/ [3] https://github.com/philips-software https://github.com/philips-software Edit: for reference, the startup screen shows PHILIPS CASSETTE BASIC Versie 1.1 NL 14966 bytes vrij
- asdefghyk 1y agoJointly copyright would have to make it moore complicated ....
- jdswain 1y agoIt'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.
- JKCalhoun 1y agoHappy to see it works for the KIM-1.
- classichasclass 1y agoBut you'll need one of the 8K boards ...
- vegadw 1y ago` LDWDI WORDS ;MORE BULLSHIT.`
- gabrielsroka 1y agohttps://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm#L6897 https://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm...
- unleaded 1y agoIs 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/Unravelled%20Series/ https://colorcomputerarchive.com/repo/Documents/Books/Unrave...
- LocalH 1y agoI 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 1y agoOk, 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 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.
- ndiddy 1y agoThose are all disassemblies, not the original code (although the original code for 6809 BASIC was recently found, see https://github.com/davidlinsley/DragonBasic 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#L2064 https://github.com/microsoft/BASIC-M6502/blob/main/m6502.asm... https://github.com/mist64/msbasic/blob/master/flow1.s#L3 https://github.com/mist64/msbasic/blob/master/flow1.s#L3
- qingcharles 1y agoAnyone figured out the build process yet? I only know TASM/MASM.
- busfahrer 1y agoI 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.
- gadders 1y agoThe connoisseur's MS Basic was the version for the 6809 processor. [Repping the Dragon 32 still]
- FrankyHollywood 1y agoFor 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 https://en.wikipedia.org/wiki/Idea_Man