Microsoft has released the source code to 6502 basic with build flags for Apple II, Commodore PET, OSI and KIM-1. The source is on GitHub. https://github.com/microsoft/BASIC-M6502
Information from Microsoft:
https://opensource.microsoft.com/blog/2 ... 502-basic/
And the existing pageable.com source listing has more useful information: https://www.pagetable.com/?p=774
This is now under the MIT license, free to use and even sell:
The MIT License (MIT)
Copyright © 2025 <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Microsoft 6502 Basic released under MIT license
Re: Microsoft 6502 Basic released under MIT license
Well there's a turn up for the books, given the famous 'open letter' by Bill Gates in 1976: https://upload.wikimedia.org/wikipedia/ ... cr.pdf.jpg
Neil
Neil
Re: Microsoft 6502 Basic released under MIT license
Tjat's some awesome news!
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Microsoft 6502 Basic released under MIT license
barnacle wrote:
Well there's a turn up for the books, given the famous 'open letter' by Bill Gates in 1976: https://upload.wikimedia.org/wikipedia/ ... cr.pdf.jpg
The irony in that letter is the trustees of Dartmouth, who own the copyright to BASIC, never got a dime from Micro-soft. There is no question in my mind that Gates and Allen were guilty of intellectual property theft, and if it had happened today, would have found themselves in hot water with infringement charges.
In retrospect, relatively little that has come out of Microsoft was invented by them. More than a little of it was a copy of, or outright theft of, others’ work.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Microsoft 6502 Basic released under MIT license
Thanks for the Information *thumb up*
ROR A? Where we're coding, we don't need A.
Re: Microsoft 6502 Basic released under MIT license
That code was written for the MACRO-10 assembler, a tool running on PDP-10.
It depends on a macro file not published.
6502 opcodes were implemented as macros. As far as I understand, instructions with multiple addressing modes have multiple names, for instance LDA (absolute?) and LDAI (immediate?).
There’s also a lot of conditional assembly.
Is there a tool that could translate the code to ca65 format? Or should one be made?
It depends on a macro file not published.
6502 opcodes were implemented as macros. As far as I understand, instructions with multiple addressing modes have multiple names, for instance LDA (absolute?) and LDAI (immediate?).
There’s also a lot of conditional assembly.
Is there a tool that could translate the code to ca65 format? Or should one be made?
Re: Microsoft 6502 Basic released under MIT license
Grant Searle http://www.searle.wales/ (look for the minimum 6502 section; I can't point there directly) took the listings from Pagetable and edited them to work with ca65. I modified them slightly to work with the a65 assembler I prefer.
I have spoken to Grant in the past but haven't been able to contact him for years.
Neil
edit: https://www.pagetable.com/?p=774
I have spoken to Grant in the past but haven't been able to contact him for years.
Neil
edit: https://www.pagetable.com/?p=774
Re: Microsoft 6502 Basic released under MIT license
barnacle wrote:
Grant Searle http://www.searle.wales/ (look for the minimum 6502 section; I can't point there directly) took the listings from Pagetable and edited them to work with ca65. I modified them slightly to work with the a65 assembler I prefer.
edit: https://www.pagetable.com/?p=774
edit: https://www.pagetable.com/?p=774
Michael Steil did his work many years ago. In his articles on pagetable, he talks about patches and additions made by vendors, for instance Commodore. At least in theory companies like Cloanto (successor of Commodore) and Apple could still have copyright to that work.
I have never used the MACRO-10 assembler. The brute force solution is to make a parser based on the assembler manual. That involves implementing at least part of the assembler logic. The parsed code could then be translated to a format usable by current 6502 assemblers. More than a long weekend of coding…
The question is if there’s an easier solution.
Re: Microsoft 6502 Basic released under MIT license
And a very good question it is... I suspect one way might be to go through the MS supplied version in github and compare it against Michael's version where he documents the changes... https://www.pagetable.com/?p=46
Not a trivial task, I fear, but perhaps easier than building a MACRO-10 assembler from scratch.
Neil
Not a trivial task, I fear, but perhaps easier than building a MACRO-10 assembler from scratch.
Neil
Re: Microsoft 6502 Basic released under MIT license
stefan1 wrote:
That code was written for the MACRO-10 assembler, a tool running on PDP-10.
It depends on a macro file not published.
6502 opcodes were implemented as macros. As far as I understand, instructions with multiple addressing modes have multiple names, for instance LDA (absolute?) and LDAI (immediate?).
There’s also a lot of conditional assembly.
Is there a tool that could translate the code to ca65 format? Or should one be made?
It depends on a macro file not published.
6502 opcodes were implemented as macros. As far as I understand, instructions with multiple addressing modes have multiple names, for instance LDA (absolute?) and LDAI (immediate?).
There’s also a lot of conditional assembly.
Is there a tool that could translate the code to ca65 format? Or should one be made?
https://projects.drogon.net/microsoft-basic/
and see the sources at: https://www.pagetable.com/?p=46
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: Microsoft 6502 Basic released under MIT license
Indeed. But Stefan's point is (if I understand correctly) that those pagetable build files contain possibly proprietary data - either bugfixes or localisations - from the companies who bought the original basic. And the question is, are those changes still under copyright, or are they in the code the MS has open sourced (in which case, there is no issue)? At least one of those companies is still going strong and has awfully deep pockets, and no obvious aversion to deepening them further.
Neil
Neil
Re: Microsoft 6502 Basic released under MIT license
barnacle wrote:
Well there's a turn up for the books, given the famous 'open letter' by Bill Gates in 1976: https://upload.wikimedia.org/wikipedia/ ... cr.pdf.jpg
Neil
Neil