Microsoft BASIC For 6502 Is Now Open Source

An overriding memory for those who used 8-bit machines back in the day was of using BASIC to program them. Without a disk-based operating system as we would know it today, these systems invariably …

Hackaday

Hackaday recently featured an FPGA implementation of a 32 bit version of the 6502, the W65C832, for which WDC had made datasheet, but was never turned into silicon:
https://www.mikekohn.net/micro/w65c832_fpga.php

Seeing this article, it was interesting to imagine how the Commodore 64 might have evolved to compete with a 386.

And today, Microsoft open sourced its 6502 BASIC: https://opensource.microsoft.com/blog/2025/09/03/microsoft-open-source-historic-6502-basic/

What would a DOS 5-like evolution of C64 Basic look like, with a super GEOS, running on a W65C832? #c64 #6502 #msbasic

Mike Kohn!

Mike Kohn's music, software, and electronics projects.

Today's project, for which I spilt blood, is finally to get a log of the output from the garage mounted solar panels, using a 40 year old computer to do the logging just because, er, why not? An Arduino is calculating output in watts from the time between pulses which come from an energy meter in the garage, sending them by serial connection to the NEC PC8201a which does the logging.

It's powered by a very old and slightly crusty home made variable power supply.

The NEC is running a program written in Microsoft BASIC. Like most people of my age I started writing BASIC before this computer was made, but it's far from my favourite language so I've not written any BASIC in a *very* long time (except a loader for a spectrum program a few years ago). Because I had never used it before, and on this occasion I could, this program uses the ON COM GOSUB feature. This feature interrupts the flow of the main program whenever data arrives on the serial port, similar in concept to how hardware interrupts work on the processor itself. A bizarre thing for any BASIC dialect to include! As this is BASIC, all variables are global and there's no stack to save state on.

It has 16 K of RAM, shared by the program, file system, my logged data etc.
#basic #msbasic #goto #gosub #NECPC8201A #playingwithcomputers

New release: swedish Whist, a BASIC game from 1980 bugfixed and improved: https://netzherpes.de/post/swedish-whist-a-basic-game #basic #kim1 #pal1 #65o2 #mos6502 #msbasic
Swedish Whist - a BASIC game - netzherpes

My friend Dave Hassler contacted me last week and presented a little game he found on a disk called "whist". The card game is a simplier

I think I've found a bug in a 1977 version of Basic... I wonder if it's a new finding?

110 A=SQR(2)
120 B=SQR(3)
130 C=SQR(6)
140 PRINT A*B-C
150 PRINT C-A*B

Turns out A*B-C is non zero, which is fair and more or less expected, but C-A*B is different - it's zero - and I didn't expect that.

This is of course Microsoft #Basic for the #Commodore #PET. The problem seems to be present in all their 6502 basics.

https://www.masswerk.at/pet/?data=base64:MTEwIEE9U1FSKDIpCjEyMCBCPVNRUigzKQoxMzAgQz1TUVIoNikKMTQwIFBSSU5UIEEqQi1DCjE1MCBQUklOVCBDLUEqQg==&autorun=true

#retroComputing #MSBasic

Commodore PET 2001

An online emulator of the Commodore PET 2001 computer.

Yes, that's the code I expected - the spiky not-quite-Mandelbrot jumps out at you once you've seen both versions side by side.

ZTEMP would be as good as ZR.

The ambiguity in long variable names is really a misfeature - easy to have bugs and hard to find them.

#msbasic #basic

@rc2014