#Microsoft is ruining my day, but maybe this will make someone else's
https://hackaday.com/2025/09/04/microsoft-basic-for-6502-is-now-open-source/
#Microsoft is ruining my day, but maybe this will make someone else's
https://hackaday.com/2025/09/04/microsoft-basic-for-6502-is-now-open-source/
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
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
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.