MS-BASIC-like Interpreter ... in C

rje

New Member
Nov 6, 2019
26
11
3
Here's a thought. Please note that, potentially, we're not limited to re-creating an MS-BASIC-like interpreter in 9K.

It's probably not a good idea, but we do have cross-assemblers now, and can write BASIC interpreters in .... wait for it .... C.

The binary would be bloated, yes. It might be TOO bloated, yes. On the other hand, it might be okay.

Just a thought. Because C is more my speed than assembly.
 
May 22, 2019
592
300
63
The performance will be pretty abysmal, though. At the end of the day, the system ROMs really need to be assembly code.
 

BruceMcF

Active Member
May 19, 2019
205
63
28
Here's a thought. Please note that, potentially, we're not limited to re-creating an MS-BASIC-like interpreter in 9K.

It's probably not a good idea, but we do have cross-assemblers now, and can write BASIC interpreters in .... wait for it .... C.

The binary would be bloated, yes. It might be TOO bloated, yes. On the other hand, it might be okay.

Just a thought. Because C is more my speed than assembly.
My idea along that line was to use the C source for the CBM compatible Basic as the functional description and then implement that in 65c02 assembler. That can replicate the "clean room" approach of the first PC-compatible BIOS, so long as the team doing the implementation are not intimately familiar with Microsoft 6502 Basic V2.

But if Paul Robson already has an open source MS-Basic-ish 6502 Basic, my first preference would be to have a look at that and see how suitable it it. https://github.com/paulscottrobson/basic-65
 

rje

New Member
Nov 6, 2019
26
11
3
My idea along that line was to use the C source for the CBM compatible Basic as the functional description and then implement that in 65c02 assembler. That can replicate the "clean room" approach of the first PC-compatible BIOS, so long as the team doing the implementation are not intimately familiar with Microsoft 6502 Basic V2.

But if Paul Robson already has an open source MS-Basic-ish 6502 Basic, my first preference would be to have a look at that and see how suitable it it. https://github.com/paulscottrobson/basic-65
Two good ideas to look at. Thank you.

Paul's solution in particular, but of course I'm always interested in C (that's Michael's code, isn't it?)


Looks like Paul Robson is related somehow to the MEGA 65 project perhaps? His mega-basic interpreter looks to be portable between 65C02/65C816/4510.

Wow, he's even written an RPL interpreter ROM for the X16. So this guy is certifiable. I like it.
 
Last edited:
  • Like
Reactions: BruceMcF

BruceMcF

Active Member
May 19, 2019
205
63
28
Two good ideas to look at. Thank you.

Paul's solution in particular, but of course I'm always interested in C (that's Michael's code, isn't it?)
If I recall correctly, yes it is. So it would have to be someone OTHER THAN Micheal doing the implementation ... he is far too intimately familiar with the Microsoft 6502 Basic code base to qualify for coding on the clean room side.
 

Aramis

New Member
Jan 29, 2020
11
4
3
Did some digging... MS VisualBasic.net and the .Net framework are open-source.
I'm not certain that's of much use, but as of 2008, Microsoft was explicit about smallbasic not being open. (That's the only non-dotnet reference I was able to dig up casually.