

While the former could fit well into 8 KB, so that a computer manufacturer could add some machine-specific I/O code and ship a single 8 KB ROM, code density was less on the 6502, and they could not fit it significantly below 8 KB – it was around 7900 bytes – so that computers with BASIC in ROM would require more than a single 8 KB ROM chip. Ric Weiland, Bill Gates and Monte Davidoff at Microsoft wrote MOS 6502 BASIC in the summer of 1976 by converting the Intel 8080 version. Make sure to read on to the end of the article, as it explains more about the source and what you can do with it. You are welcome to help clean up the source more, to make it more readable and to break features out into CONFIG_* defines, so that the source base can be made more customizable. This will create the seven files cbmbasic1.bin, osi.bin, applesoft.bin, kb9.bin, cbmbasic2.bin, kbd.bin and microtan.bin in the “tmp” directory, which are identical to the original ROMs.

You can build the source by running the shell script make.sh. The source can be assembled into byte-exact versions of the following seven BASICs: In order to assemble if, you will need the CC65 compiler/assembler/linker package. Version: My private version number used in this article and in my combined source The Microsoft BASIC 6502 Combined Source Codeĭownload the assembly source code here: msbasic.zip ROR: Whether the ROR assembly instruction was used or whether the code worked around itīuffer: Location of the direct mode input buffer either zero page or aboveĮxtensions: What BASIC extensions were added by the OEM, of any. 9 digit als means that long error messages were included instead of two character codes, and the GET statement was supported.
#6502 emulator osx software#
ROM: Whether the software shipped in ROM, or was a program supposed to be loaded into RAMįP: Whether the 6 digit or 9 digit floating point library was included. VER: Version string inside the interpreter itself Release: Release date of this version – not necessarily the date when the source code was forked from Microsoft’s Name: Name of the computer system or BASIC interpreter These are the first eight versions of Microsoft BASIC: Name
#6502 emulator osx series#
Microsoft BASIC for MOS 6502įirst written in 1976, Microsoft BASIC for the 8 bit MOS 6502 has been available for virtually every 6502-based computer including the Commodore series (PET, C64), the Apple II series, Atari 8 bit machines, and many more. This article also presents a set of assembly source files that can be made to compile into a byte exact copy of seven different versions of Microsoft BASIC, and lets you even create your own version. This episode of “ Computer Archeology” is about reverse engineering eight different versions of Microsoft BASIC 6502 (Commodore, AppleSoft etc.), reconstructing the family tree, and understanding when bugs were fixed and when new bugs, features and easter eggs were introduced. If you have eight different versions, you can tell a lot. If you disassemble a single binary, you can never tell why something was done in a certain way. Update: The source is available at /mist64/msbasic
